summaryrefslogtreecommitdiff
path: root/src/text_buffer.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/text_buffer.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/text_buffer.py')
-rw-r--r--src/text_buffer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/text_buffer.py b/src/text_buffer.py
index f20c0cb9..8430a230 100644
--- a/src/text_buffer.py
+++ b/src/text_buffer.py
@@ -35,6 +35,11 @@ class TextBuffer(object):
def add_window(self, win):
self.windows.append(win)
+ @property
+ def last_message(self):
+ return self.messages[-1] if self.messages else None
+
+
def make_message(self, txt, time, nickname, nick_color, history, user, identifier, str_time=None):
time = time or datetime.now()
if txt.startswith('/me '):