From eee7294a4c798b04913d15df590f205b6c049281 Mon Sep 17 00:00:00 2001 From: dequis Date: Sun, 24 Jan 2016 10:07:09 -0300 Subject: 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. --- protocols/jabber/conference.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols') 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; } -- cgit v1.2.3