plugin XEP-0045: fixed message type filtering when getting last stanza_id to retrieve history with MAM

This commit is contained in:
Goffi 2019-03-01 16:17:00 +01:00
commit 079d04f6ca

View file

@ -890,12 +890,15 @@ class SatMUCClient(muc.MUCClient):
room._history_type = HISTORY_MAM
room._history_d = defer.Deferred()
last_mess = yield self.host.memory.historyGet(room_jid,
None,
limit=1,
between=False,
filters={u'last_stanza_id': True},
profile=client.profile)
last_mess = yield self.host.memory.historyGet(
room_jid,
None,
limit=1,
between=False,
filters={
u'types': C.MESS_TYPE_GROUPCHAT,
u'last_stanza_id': True},
profile=client.profile)
if last_mess:
stanza_id = last_mess[0][-1][u'stanza_id']
rsm_req = rsm.RSMRequest(max_=100, after=stanza_id)