summaryrefslogtreecommitdiff
path: root/plugins/time_marker.py
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-04-28 01:02:49 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-04-28 01:02:49 +0100
commit7a1b2b982f431eb591d348fbb799a4d761a13c65 (patch)
tree4bb79aa2b03b9fd303dffb747e17319bcf0d722f /plugins/time_marker.py
parent200f229464d87791f9cc67a03df0259741bf24a6 (diff)
downloadpoezio-7a1b2b982f431eb591d348fbb799a4d761a13c65.tar.gz
poezio-7a1b2b982f431eb591d348fbb799a4d761a13c65.tar.bz2
poezio-7a1b2b982f431eb591d348fbb799a4d761a13c65.tar.xz
poezio-7a1b2b982f431eb591d348fbb799a4d761a13c65.zip
plugins: Update use of tab.name to tab.jid where appropriate
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'plugins/time_marker.py')
-rw-r--r--plugins/time_marker.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/time_marker.py b/plugins/time_marker.py
index bd6af1c4..76f7e589 100644
--- a/plugins/time_marker.py
+++ b/plugins/time_marker.py
@@ -36,7 +36,7 @@ from datetime import datetime, timedelta
class Plugin(BasePlugin):
def init(self):
self.api.add_event_handler("muc_msg", self.on_muc_msg)
- # Dict of MucTab.name: last_message date, so we don’t have to
+ # Dict of MucTab.jid.bare: last_message date, so we don’t have to
# retrieve the messages of the given muc to look for the last
# message’s date each time. Also, now that I think about it, the
# date of the message is not event kept in the Message object, so…
@@ -66,8 +66,8 @@ class Plugin(BasePlugin):
res += "%s seconds, " % seconds
return res[:-2]
- last_message_date = self.last_messages.get(tab.name)
- self.last_messages[tab.name] = datetime.now()
+ last_message_date = self.last_messages.get(tab.jid.bare)
+ self.last_messages[tab.jid.bare] = datetime.now()
if last_message_date:
delta = datetime.now() - last_message_date
if delta >= timedelta(0, self.config.get('delay', 900)):