summaryrefslogtreecommitdiff
path: root/poezio/tabs/muctab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-11 13:03:32 +0200
committermathieui <mathieui@mathieui.net>2021-04-11 16:33:53 +0200
commita827743b8677ff9bb4ea63bbb1ac690fdfcb6457 (patch)
tree830d69d5e1a39a5ffa51538d610037b1c41f268a /poezio/tabs/muctab.py
parentf6ba263305da5c5501bda8e22532852a3c9ea230 (diff)
downloadpoezio-a827743b8677ff9bb4ea63bbb1ac690fdfcb6457.tar.gz
poezio-a827743b8677ff9bb4ea63bbb1ac690fdfcb6457.tar.bz2
poezio-a827743b8677ff9bb4ea63bbb1ac690fdfcb6457.tar.xz
poezio-a827743b8677ff9bb4ea63bbb1ac690fdfcb6457.zip
internal: make the MAMFiller an attribute of ChatTabs
and fetch logs in conversationtabs and privatetabs
Diffstat (limited to 'poezio/tabs/muctab.py')
-rw-r--r--poezio/tabs/muctab.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 9334ce4c..593be6ce 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -84,7 +84,6 @@ class MucTab(ChatTab):
plugin_keys: Dict[str, Callable[..., Any]] = {}
additional_information: Dict[str, Callable[[str], str]] = {}
lagged: bool = False
- mam_filler: Optional[MAMFiller]
def __init__(self, core: Core, jid: JID, nick: str, password: Optional[str] = None) -> None:
ChatTab.__init__(self, core, jid)
@@ -105,7 +104,6 @@ class MucTab(ChatTab):
self.topic_from = ''
# Self ping event, so we can cancel it when we leave the room
self.self_ping_event: Optional[timed_events.DelayedEvent] = None
- self.mam_filler = None
# UI stuff
self.topic_win = windows.Topic()
self.v_separator = windows.VerticalSeparator()
@@ -181,7 +179,8 @@ class MucTab(ChatTab):
seconds = None
if last_message is not None:
seconds = (datetime.now() - last_message.time).seconds
- self.mam_filler = MAMFiller(self, logger)
+ if self.mam_filler is None and config.getbool('mam_sync'):
+ self.mam_filler = MAMFiller(logger, self)
muc.join_groupchat(
self.core,
self.jid.bare,