summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhur Garg <madhurgarg96@gmail.com>2019-08-13 06:21:44 +0530
committerMadhur Garg <madhurgarg96@gmail.com>2019-08-22 00:54:25 +0530
commitf496be64031d9a41ff2e6f0d30a2f6114b5f0d82 (patch)
treea19183873ab732ec00a11ed45e168ef8d9dc5499
parent592932f7ca2e89a5e6e4384e31bd0bb3ebfcaa58 (diff)
downloadpoezio-f496be64031d9a41ff2e6f0d30a2f6114b5f0d82.tar.gz
poezio-f496be64031d9a41ff2e6f0d30a2f6114b5f0d82.tar.bz2
poezio-f496be64031d9a41ff2e6f0d30a2f6114b5f0d82.tar.xz
poezio-f496be64031d9a41ff2e6f0d30a2f6114b5f0d82.zip
Removed MAM start/end messages, because they are not important for infinite scroll.
-rw-r--r--poezio/mam.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/poezio/mam.py b/poezio/mam.py
index fdbfd2af..63c2ef86 100644
--- a/poezio/mam.py
+++ b/poezio/mam.py
@@ -20,10 +20,7 @@ def add_line(text_buffer: TextBuffer, text: str, str_time: str, nick: str, top:
time = datetime.strptime(time, '%Y-%m-%d %H:%M:%S')
time = time.replace(tzinfo=timezone.utc).astimezone(tz=None)
time = time.replace(tzinfo=None)
- if nick is 'MAM':
- color = get_theme().COLOR_ME_MESSAGE
- else:
- color = get_theme().COLOR_OWN_NICK
+ color = get_theme().COLOR_OWN_NICK
text_buffer.add_message(
text,
time,
@@ -95,9 +92,6 @@ async def query(tab, remote_jid, top, start=None, end=None, before=None):
msg_count += 1
msgs.reverse()
for msg in msgs:
- if msg is msgs[0]:
- timestamp = msg['mam_result']['forwarded']['delay']['stamp']
- add_line(text_buffer, 'Start of MAM query: ', timestamp, 'MAM', top)
forwarded = msg['mam_result']['forwarded']
timestamp = forwarded['delay']['stamp']
message = forwarded['stanza']
@@ -108,9 +102,6 @@ async def query(tab, remote_jid, top, start=None, end=None, before=None):
else:
nick = nick.split('/')[0]
add_line(text_buffer, message['body'], timestamp, nick, top)
- if msg is msgs[len(msgs)-1]:
- timestamp = msg['mam_result']['forwarded']['delay']['stamp']
- add_line(text_buffer, 'End of MAM query: ', timestamp, 'MAM', top)
tab.text_win.scroll_up(len(tab.text_win.built_lines))
else:
for msg in rsm['mam']['results']: