summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-03-28 01:01:24 +0100
committermathieui <mathieui@mathieui.net>2014-03-28 01:01:24 +0100
commitc537485c0d8ad28563195914b8af0984c71caca4 (patch)
tree2d21bb9121872518b841e1d70374bc9658b2bb2c
parentf7294b29e4c3f1b0aa73b088baf7b19f8b334ca5 (diff)
downloadpoezio-c537485c0d8ad28563195914b8af0984c71caca4.tar.gz
poezio-c537485c0d8ad28563195914b8af0984c71caca4.tar.bz2
poezio-c537485c0d8ad28563195914b8af0984c71caca4.tar.xz
poezio-c537485c0d8ad28563195914b8af0984c71caca4.zip
Fix #2493 (private tab displaying a join on /nick)
-rw-r--r--src/core.py1
-rw-r--r--src/tabs/privatetab.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/core.py b/src/core.py
index 890e59d9..bf24a20e 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1086,7 +1086,6 @@ class Core(object):
tab = self.get_tab_by_name('%s/%s' % (room_name, old_nick), tabs.PrivateTab)
if tab:
tab.rename_user(old_nick, new_nick)
- self.on_user_rejoined_private_conversation(room_name, new_nick)
def on_user_left_private_conversation(self, room_name, nick, status_message):
"""
diff --git a/src/tabs/privatetab.py b/src/tabs/privatetab.py
index b1c11ae2..bafee073 100644
--- a/src/tabs/privatetab.py
+++ b/src/tabs/privatetab.py
@@ -308,6 +308,7 @@ class PrivateTab(ChatTab):
def get_text_window(self):
return self.text_win
+ @refresh_wrapper.conditional
def rename_user(self, old_nick, new_nick):
"""
The user changed her nick in the corresponding muc: update the tab’s name and
@@ -316,6 +317,7 @@ class PrivateTab(ChatTab):
self.add_message('\x193}%(old)s\x19%(info_col)s} is now known as \x193}%(new)s' % {'old':old_nick, 'new':new_nick, 'info_col': dump_tuple(get_theme().COLOR_INFORMATION_TEXT)}, typ=2)
new_jid = safeJID(self.name).bare+'/'+new_nick
self.name = new_jid
+ return self.core.current_tab() is self
@refresh_wrapper.conditional
def user_left(self, status_message, from_nick):