# HG changeset patch # User Goffi # Date 1551453420 -3600 # Node ID 177f11163ed090c7f310ee8b84f68f768693dc2a # Parent 1b6547fb80dad02422a9e5964274ae571e01c377 plugin XEP-0045: fixed message type filtering when getting last stanza_id to retrieve history with MAM diff -r 1b6547fb80da -r 177f11163ed0 sat/plugins/plugin_xep_0045.py --- a/sat/plugins/plugin_xep_0045.py Fri Mar 01 15:35:55 2019 +0100 +++ b/sat/plugins/plugin_xep_0045.py Fri Mar 01 16:17:00 2019 +0100 @@ -890,12 +890,15 @@ 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)