Changeset 49108f3 for protocols/jabber


Ignore:
Timestamp:
2017-11-20T00:51:16Z (7 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
4a9c6b0
Parents:
f75aaac
Message:

jabber: Fix chat joins when ext_jid is provided for your own user

This is the presence needed to finalize a join to the channel, the
'from' field is our own user in the context of that channel:

<presence to="dx@server/resource" from="channel@…/dx">

<x xmlns="http://jabber.org/protocol/muc#user">

<status code="110"/>
<item jid="~dx@198.51.100.1" affiliation="none" role="participant"/>

</x>

</presence>

Bitlbee takes the stuff to <item jid="..."> as the "real" jid, as it
does for non-anonymous MUCs. It sets that to ext_jid, and uses it as the
handle internally.

In this particular case, that real jid is nonsense for us, so
imcb_chat_add_buddy() interprets that as yet another person joining the
channel, instead of the expected self-join.

This fixes it by checking if the buddy is our own user, and ignoring the
provided ext_jid in those cases.

Thanks to ivucica for reporting this, who was using Biboumi (a gateway
from XMPP to IRC)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/conference.c

    rf75aaac r49108f3  
    329329                        }
    330330                        bud->flags |= JBFLAG_IS_ANONYMOUS;
     331                } else if (bud == jc->me) {
     332                        g_free(bud->ext_jid);
     333                        bud->ext_jid = g_strdup(jd->me);
    331334                }
    332335
Note: See TracChangeset for help on using the changeset viewer.