Changed stanza_id attribute to last_stanza_id.

This commit is contained in:
Madhur Garg 2019-08-21 13:21:02 +05:30
parent b01c796551
commit 47dc7f0095
2 changed files with 3 additions and 3 deletions

View file

@ -122,7 +122,7 @@ async def query(tab, remote_jid, top, start=None, end=None, before=None):
forwarded = msg['mam_result']['forwarded']
timestamp = forwarded['delay']['stamp']
message = forwarded['stanza']
tab.stanza_id = msg['mam_result']['id']
tab.last_stanza_id = msg['mam_result']['id']
nick = str(message['from'])
add_line(tab, text_buffer, message['body'], timestamp, nick, top)
tab.text_win.scroll_up(len(tab.text_win.built_lines))
@ -141,7 +141,7 @@ async def query(tab, remote_jid, top, start=None, end=None, before=None):
def mam_scroll(tab):
remote_jid = tab.jid
text_buffer = tab._text_buffer
before = tab.stanza_id
before = tab.last_stanza_id
end = datetime.now()
if isinstance(tab, tabs.MucTab) is False:
for message in text_buffer.messages:

View file

@ -475,7 +475,7 @@ class ChatTab(Tab):
assert jid.domain
self._jid = jid
self.query_id = 0
self.stanza_id = None
self.last_stanza_id = None
self._name = jid.full # type: Optional[str]
self.text_win = None