diff options
author | dequis <dx@dxzone.com.ar> | 2016-01-24 10:07:09 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-01-24 10:07:09 -0300 |
commit | eee7294a4c798b04913d15df590f205b6c049281 (patch) | |
tree | e4c5e1bc4672b3f415729902518dbf4469e2550b | |
parent | 1239d05f16eb980bb0a8b717de5c11847845ddfa (diff) |
jabber: Mark messages from other resources as OPT_SELFMESSAGE too
The jabber_buddy used for messages sent from other resources connected
to the same groupchat has a different ext_jid and it's a different
object than jc->me, so doing a string comparison against acc->user is
needed.
-rw-r--r-- | protocols/jabber/conference.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index 3de205c8..db117faf 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -478,7 +478,9 @@ void jabber_chat_pkt_message(struct im_connection *ic, struct jabber_buddy *bud, if (bud) { bare_jid = jabber_get_bare_jid(bud->ext_jid ? bud->ext_jid : bud->full_jid); final_from = bare_jid; - flags = (bud == jc->me) ? OPT_SELFMESSAGE : 0; + if (bud == jc->me || (g_strcasecmp(final_from, ic->acc->user) == 0)) { + flags = OPT_SELFMESSAGE; + } } else { final_from = nick; } |