summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-06-26 20:58:04 +0200
committermathieui <mathieui@mathieui.net>2021-06-26 20:59:55 +0200
commit3698b20a47c8154322841a84d5bca0dbc70ac923 (patch)
tree884ea2f1d76134f83266996423ae9235357240d7
parentae3b747e94e52f14a53a53bb04db828b98369304 (diff)
downloadpoezio-3698b20a47c8154322841a84d5bca0dbc70ac923.tar.gz
poezio-3698b20a47c8154322841a84d5bca0dbc70ac923.tar.bz2
poezio-3698b20a47c8154322841a84d5bca0dbc70ac923.tar.xz
poezio-3698b20a47c8154322841a84d5bca0dbc70ac923.zip
fix: hack around the time limit for topic messages
we cannot have nice things
-rw-r--r--poezio/log_loader.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/poezio/log_loader.py b/poezio/log_loader.py
index eae89607..146bc9b4 100644
--- a/poezio/log_loader.py
+++ b/poezio/log_loader.py
@@ -143,10 +143,10 @@ class LogLoader:
count = 0
for msg in iterate_messages_reverse(filepath):
typ_ = msg.pop('type')
- if msg['time'] < limit:
- break
if typ_ == 'message':
results.append(make_line_local(self.tab, msg))
+ elif msg['time'] < limit and 'set the subject' not in msg['txt']:
+ break
if len(results) >= nb:
break
count += 1
@@ -201,12 +201,12 @@ class LogLoader:
filepath = self.logger.get_file_path(self.tab.jid)
for msg in iterate_messages_reverse(filepath):
typ_ = msg.pop('type')
- if msg['time'] < limit:
- break
if start and msg['time'] < start:
break
if typ_ == 'message' and (not end or msg['time'] < end):
results.append(make_line_local(self.tab, msg))
+ elif msg['time'] < limit and 'set the subject' not in msg['txt']:
+ break
if len(results) >= amount:
break
count += 1