Ticket #1137: 0001-Fix-receiving-channel-topic-when-the-from-field-is-u.patch

File 0001-Fix-receiving-channel-topic-when-the-from-field-is-u.patch, 1.1 KB (added by dx, at 2014-07-24T10:45:49Z)

Fix receiving channel topic when the "from" field is unknown

  • protocols/jabber/conference.c

    From 14cbbd6a289d0d856697c10f862410e59511275d Mon Sep 17 00:00:00 2001
    From: dequis <dx@dxzone.com.ar>
    Date: Thu, 24 Jul 2014 07:41:47 -0300
    Subject: [PATCH] Fix receiving channel topic when the "from" field is unknown
    
    ---
     protocols/jabber/conference.c | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c
    index c8930f8..4dbdba9 100644
    a b void jabber_chat_pkt_message( struct im_connection *ic, struct jabber_buddy *bud 
    355355{
    356356        struct xt_node *subject = xt_find_node( node->children, "subject" );
    357357        struct xt_node *body = xt_find_node( node->children, "body" );
    358         struct groupchat *chat = bud ? jabber_chat_by_jid( ic, bud->bare_jid ) : NULL;
    359         struct jabber_chat *jc = chat ? chat->data : NULL;
     358        char *from = ( bud ) ? bud->bare_jid : xt_find_attr( node, "from" );
     359        struct groupchat *chat = ( from ) ? jabber_chat_by_jid( ic, from ) : NULL;
     360        struct jabber_chat *jc = ( chat ) ? chat->data : NULL;
    360361        char *s;
    361362       
    362363        if( subject && chat )