summaryrefslogtreecommitdiff
path: root/poezio/core/handlers.py
diff options
context:
space:
mode:
authorMadhur Garg <madhurgarg96@gmail.com>2019-03-21 02:41:39 +0530
committerMadhur Garg <madhurgarg96@gmail.com>2019-03-23 23:46:27 +0530
commit24a0df30f022f47d8b2cf4b0d7791b94125a3027 (patch)
tree2c0c84232aab720223331eba63b62fc86c35b7cd /poezio/core/handlers.py
parent614ea5423b4ca0c14de525e6b4cc03568d1a3eae (diff)
downloadpoezio-24a0df30f022f47d8b2cf4b0d7791b94125a3027.tar.gz
poezio-24a0df30f022f47d8b2cf4b0d7791b94125a3027.tar.bz2
poezio-24a0df30f022f47d8b2cf4b0d7791b94125a3027.tar.xz
poezio-24a0df30f022f47d8b2cf4b0d7791b94125a3027.zip
Corrected the value of timestamp for MUC subject. Fixes #3451
Corrected the value of timestamp for MUC subject. Fixes #3451 Corrects the value of timestamp for messages with delay tag. Fixes #3451
Diffstat (limited to 'poezio/core/handlers.py')
-rw-r--r--poezio/core/handlers.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 9cdfb59a..6fa9935b 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -1318,6 +1318,7 @@ class HandlerCore:
room_from = message.get_mucroom()
tab = self.core.tabs.by_name_and_class(room_from, tabs.MucTab)
subject = message['subject']
+ time = message['delay']['stamp']
if subject is None or not tab:
return
if subject != tab.topic:
@@ -1329,6 +1330,7 @@ class HandlerCore:
'text_col': dump_tuple(theme.COLOR_NORMAL_TEXT),
'subject': subject,
'user': '',
+ 'str_time': time,
}
if nick_from:
user = tab.get_user_by_name(nick_from)
@@ -1349,13 +1351,13 @@ class HandlerCore:
tab.add_message(
"%(user)s set the subject to: \x19%(text_col)s}%(subject)s"
% fmt,
- time=None,
+ str_time=time,
typ=2)
else:
tab.add_message(
"\x19%(info_col)s}The subject is: \x19%(text_col)s}%(subject)s"
% fmt,
- time=None,
+ str_time=time,
typ=2)
tab.topic = subject
tab.topic_from = nick_from