summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-11-17 19:17:02 +0100
committermathieui <mathieui@mathieui.net>2012-11-17 19:17:02 +0100
commitac806cbb4149cd3684b9b297667876a5dd84dc52 (patch)
tree530983e222bff6fb1354798d539e118cc2466352 /src/tabs.py
parent6781f67e80aa5ec86c84b49ef4526dcef9feceda (diff)
downloadpoezio-ac806cbb4149cd3684b9b297667876a5dd84dc52.tar.gz
poezio-ac806cbb4149cd3684b9b297667876a5dd84dc52.tar.bz2
poezio-ac806cbb4149cd3684b9b297667876a5dd84dc52.tar.xz
poezio-ac806cbb4149cd3684b9b297667876a5dd84dc52.zip
Fix the history numbers when re-joining a room
the <history/> element had a xmlns="" instead of the proper namespace.
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tabs.py b/src/tabs.py
index d98382d9..b14f1b04 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -654,7 +654,6 @@ class MucTab(ChatTab):
self.info_header = windows.MucInfoWin()
self.input = windows.MessageInput()
self.ignores = [] # set of Users
- self.last_connection = 0
# keys
self.key_func['^I'] = self.completion
self.key_func['M-u'] = self.scroll_user_list_down
@@ -691,6 +690,13 @@ class MucTab(ChatTab):
def general_jid(self):
return self.get_name()
+ @property
+ def last_connection(self):
+ last_message = self._text_buffer.last_message
+ if last_message:
+ return last_message.time
+ return None
+
@refresh_wrapper.always
def go_to_next_hl(self):
"""
@@ -1538,7 +1544,6 @@ class MucTab(ChatTab):
Set the state of the room as not joined, so
we can know if we can join it, send messages to it, etc
"""
- self.last_connection = int(time.time())
self.users = []
if self is not self.core.current_tab():
self.state = 'disconnected'