diff --git a/sat/plugins/plugin_xep_0045.py b/sat/plugins/plugin_xep_0045.py index 18c4dd3c..6cfb2d5a 100755 --- a/sat/plugins/plugin_xep_0045.py +++ b/sat/plugins/plugin_xep_0045.py @@ -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)