Ignore:
Timestamp:
2008-02-03T23:33:18Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
69ac78c
Parents:
8ff0a61
Message:

Messages from the user are also included in backlogs when joining a Jabber
chatroom. Until now they were ignored, which might make backlogs a little
bit confusing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/conference.c

    r8ff0a61 r63075d7  
    122122        struct jabber_chat *jc = c->data;
    123123        struct xt_node *node;
     124       
     125        jc->flags |= JCFLAG_MESSAGE_SENT;
    124126       
    125127        node = xt_new_node( "body", message, NULL );
     
    295297        struct xt_node *subject = xt_find_node( node->children, "subject" );
    296298        struct xt_node *body = xt_find_node( node->children, "body" );
    297         struct groupchat *chat = NULL;
     299        struct groupchat *chat = bud ? jabber_chat_by_jid( ic, bud->bare_jid ) : NULL;
     300        struct jabber_chat *jc = chat ? chat->data : NULL;
    298301        char *s;
    299302       
    300         if( bud == NULL )
     303        if( bud == NULL || ( jc && ~jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me ) )
    301304        {
    302305                char *nick;
     
    346349                return;
    347350        }
    348         else if( ( chat = jabber_chat_by_jid( ic, bud->bare_jid ) ) == NULL )
     351        else if( chat == NULL )
    349352        {
    350353                /* How could this happen?? We could do kill( self, 11 )
Note: See TracChangeset for help on using the changeset viewer.