summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathieu Pasquet <mathieui@mathieui.net>2014-01-30 15:16:49 +0100
committerMathieu Pasquet <mathieui@mathieui.net>2014-01-30 15:16:49 +0100
commitbee12fd22b3affba75fcbc24ad913d20d19d4e18 (patch)
treef58d8cedbadba1e76bafb535310bc83625c9d268 /src
parent7e4a5655173e43211d16cc9d223a77bfbc5bc77f (diff)
downloadpoezio-bee12fd22b3affba75fcbc24ad913d20d19d4e18.tar.gz
poezio-bee12fd22b3affba75fcbc24ad913d20d19d4e18.tar.bz2
poezio-bee12fd22b3affba75fcbc24ad913d20d19d4e18.tar.xz
poezio-bee12fd22b3affba75fcbc24ad913d20d19d4e18.zip
Fix the nickname with carbons
Diffstat (limited to 'src')
-rw-r--r--src/core.py6
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)