From bee12fd22b3affba75fcbc24ad913d20d19d4e18 Mon Sep 17 00:00:00 2001 From: Mathieu Pasquet Date: Thu, 30 Jan 2014 15:16:49 +0100 Subject: Fix the nickname with carbons --- src/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core.py b/src/core.py index d481ae6a..e64dd89b 100644 --- a/src/core.py +++ b/src/core.py @@ -2951,12 +2951,14 @@ class Core(object): if not remote_nick and config.get('enable_user_nick', 'true') != 'false': if message.xml.find('{http://jabber.org/protocol/nick}nick') is not None: remote_nick = message['nick']['nick'] + own = False # we wrote the message (happens with carbons) elif message['from'].bare == self.xmpp.boundjid.bare: conv_jid = message['to'] jid = self.xmpp.boundjid color = get_theme().COLOR_OWN_NICK remote_nick = self.own_nick + own = True # we are not part of that message, drop it else: return @@ -2967,8 +2969,8 @@ class Core(object): if not remote_nick and conversation.nick: remote_nick = conversation.nick - elif not remote_nick: - remote_nick = jid.user + elif not remote_nick or own: + remote_nick = conv_jid.user conversation.nick = remote_nick self.events.trigger('conversation_msg', message, conversation) -- cgit v1.2.3