diff options
author | dequis <dx@dxzone.com.ar> | 2014-07-20 03:28:49 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-01-25 23:43:34 -0300 |
commit | be1efa31e01a96be922c7addba2d9207bfbdf5fc (patch) | |
tree | 7ed979bde6284ded3cf1f1c1a7a870b2a55e9d00 /protocols/jabber/jabber_util.c | |
parent | 8519f457c31139750b9f7497834ac90a57196d22 (diff) |
Add handle_is_self() prpl function to fix JID mismatch confusion bugs
When bee_chat needs to check for self messages, it can call this
function to let the protocol implementation do the comparison.
In the case of jabber, sometimes the server reports a different username
after login, this one is stored in jd->internal_jid, and the one that is
used for login isn't changed
Diffstat (limited to 'protocols/jabber/jabber_util.c')
-rw-r--r-- | protocols/jabber/jabber_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c index d6396802..1a3d9fd4 100644 --- a/protocols/jabber/jabber_util.c +++ b/protocols/jabber/jabber_util.c @@ -823,6 +823,10 @@ gboolean jabber_set_me( struct im_connection *ic, const char *me ) jd->server = strchr( jd->me, '@' ); jd->username = g_strndup( jd->me, jd->server - jd->me ); jd->server ++; + + /* Set the "internal" account username, for groupchats */ + g_free( jd->internal_jid ); + jd->internal_jid = g_strdup( jd->me ); return TRUE; } |