diff options
author | Mathieu Pasquet <mathieui@mathieui.net> | 2014-01-30 15:16:49 +0100 |
---|---|---|
committer | Mathieu Pasquet <mathieui@mathieui.net> | 2014-01-30 15:16:49 +0100 |
commit | bee12fd22b3affba75fcbc24ad913d20d19d4e18 (patch) | |
tree | f58d8cedbadba1e76bafb535310bc83625c9d268 /src/core.py | |
parent | 7e4a5655173e43211d16cc9d223a77bfbc5bc77f (diff) | |
download | poezio-bee12fd22b3affba75fcbc24ad913d20d19d4e18.tar.gz poezio-bee12fd22b3affba75fcbc24ad913d20d19d4e18.tar.bz2 poezio-bee12fd22b3affba75fcbc24ad913d20d19d4e18.tar.xz poezio-bee12fd22b3affba75fcbc24ad913d20d19d4e18.zip |
Fix the nickname with carbons
Diffstat (limited to 'src/core.py')
-rw-r--r-- | src/core.py | 6 |
1 files 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) |