Merge branch 'mam' into 'master'
Fixes message duplication on /reconnect. See merge request poezio/poezio!43
This commit is contained in:
commit
eec8dcc206
2 changed files with 7 additions and 4 deletions
|
@ -2008,8 +2008,10 @@ class Core:
|
|||
nick,
|
||||
passwd=bm.password,
|
||||
status=self.status.message,
|
||||
show=self.status.show)
|
||||
mam.mam_scroll(tab, action='query')
|
||||
show=self.status.show,
|
||||
tab=tab)
|
||||
if tab._text_buffer.last_message is None:
|
||||
mam.mam_scroll(tab, action='query')
|
||||
|
||||
def check_bookmark_storage(self, features):
|
||||
private = 'jabber:iq:private' in features
|
||||
|
|
|
@ -109,7 +109,8 @@ def join_groupchat(core,
|
|||
passwd='',
|
||||
status=None,
|
||||
show=None,
|
||||
seconds=None):
|
||||
seconds=None,
|
||||
tab=None):
|
||||
xmpp = core.xmpp
|
||||
stanza = xmpp.make_presence(
|
||||
pto='%s/%s' % (jid, nick), pstatus=status, pshow=show)
|
||||
|
@ -119,7 +120,7 @@ def join_groupchat(core,
|
|||
passelement.text = passwd
|
||||
x.append(passelement)
|
||||
def on_disco(iq):
|
||||
if 'urn:xmpp:mam:2' in iq['disco_info'].get_features():
|
||||
if 'urn:xmpp:mam:2' in iq['disco_info'].get_features() or (tab and tab._text_buffer.last_message):
|
||||
history = ET.Element('{http://jabber.org/protocol/muc}history')
|
||||
history.attrib['seconds'] = str(0)
|
||||
x.append(history)
|
||||
|
|
Loading…
Reference in a new issue