Changeset f5c0d8e for protocols/jabber/message.c
- Timestamp:
- 2010-08-31T20:06:14Z (14 years ago)
- Branches:
- master
- Children:
- 0c85c08
- Parents:
- 8358691 (diff), 31dbb90a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/message.c
r8358691 rf5c0d8e 31 31 struct xt_node *body = xt_find_node( node->children, "body" ), *c; 32 32 struct jabber_buddy *bud = NULL; 33 char *s ;33 char *s, *room = NULL, *reason = NULL; 34 34 35 35 if( !from ) … … 52 52 for( c = node->children; ( c = xt_find_node( c, "x" ) ); c = c->next ) 53 53 { 54 char *ns = xt_find_attr( c, "xmlns" ) , *room;55 struct xt_node *inv , *reason;54 char *ns = xt_find_attr( c, "xmlns" ); 55 struct xt_node *inv; 56 56 57 57 if( ns && strcmp( ns, XMLNS_MUC_USER ) == 0 && 58 58 ( inv = xt_find_node( c->children, "invite" ) ) ) 59 59 { 60 /* This is an invitation. Set some vars which 61 will be passed to imcb_chat_invite() below. */ 60 62 room = from; 61 63 if( ( from = xt_find_attr( inv, "from" ) ) == NULL ) 62 64 from = room; 63 64 g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Invitation to chatroom %s >>\n", room ); 65 if( ( reason = xt_find_node( inv->children, "reason" ) ) && reason->text_len > 0 ) 66 g_string_append( fullmsg, reason->text ); 65 if( ( inv = xt_find_node( inv->children, "reason" ) ) && inv->text_len > 0 ) 66 reason = inv->text; 67 67 } 68 68 } … … 93 93 } 94 94 } 95 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 ) 95 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 && 96 ( !bud || !( bud->flags & JBFLAG_HIDE_SUBJECT ) ) ) 96 97 { 97 98 g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Message with subject: %s >>\n", c->text ); 99 if( bud ) 100 bud->flags |= JBFLAG_HIDE_SUBJECT; 101 } 102 else if( bud && !c ) 103 { 104 /* Yeah, possibly we're hiding changes to this field now. But nobody uses 105 this for anything useful anyway, except GMail when people reply to an 106 e-mail via chat, repeating the same subject all the time. I don't want 107 to have to remember full subject strings for everyone. */ 108 bud->flags &= ~JBFLAG_HIDE_SUBJECT; 98 109 } 99 110 … … 104 115 imcb_buddy_msg( ic, from, fullmsg->str, 105 116 0, jabber_get_timestamp( node ) ); 117 if( room ) 118 imcb_chat_invite( ic, room, from, reason ); 106 119 107 120 g_string_free( fullmsg, TRUE );
Note: See TracChangeset
for help on using the changeset viewer.