aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/conference.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-01-24 10:07:09 -0300
committerdequis <dx@dxzone.com.ar>2016-01-24 10:07:09 -0300
commiteee7294a4c798b04913d15df590f205b6c049281 (patch)
treee4c5e1bc4672b3f415729902518dbf4469e2550b /protocols/jabber/conference.c
parent1239d05f16eb980bb0a8b717de5c11847845ddfa (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.
Diffstat (limited to 'protocols/jabber/conference.c')
-rw-r--r--protocols/jabber/conference.c4
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;
}