comparison sat/plugins/plugin_xep_0045.py @ 2827:9a3b99acad91

plugin XEP-0045: fixed item-not-found exception when creating a room: MAM was checked on the room itself, this patch changes it by checking the MUC service instead.
author Goffi <goffi@goffi.org>
date Fri, 01 Mar 2019 17:32:15 +0100
parents 177f11163ed0
children fa1cc09df195
comparison
equal deleted inserted replaced
2826:177f11163ed0 2827:9a3b99acad91
966 966
967 defer.returnValue(room) 967 defer.returnValue(room)
968 968
969 @defer.inlineCallbacks 969 @defer.inlineCallbacks
970 def join(self, room_jid, nick, password=None): 970 def join(self, room_jid, nick, password=None):
971 has_mam = yield self.host.hasFeature(self.client, mam.NS_MAM, room_jid) 971 room_service = jid.JID(room_jid.host)
972 has_mam = yield self.host.hasFeature(self.client, mam.NS_MAM, room_service)
972 if not self._mam or not has_mam: 973 if not self._mam or not has_mam:
973 room = yield self._joinLegacy(self.client, room_jid, nick, password) 974 room = yield self._joinLegacy(self.client, room_jid, nick, password)
974 defer.returnValue(room) 975 defer.returnValue(room)
975 else: 976 else:
976 room = yield self._joinMAM(self.client, room_jid, nick, password) 977 room = yield self._joinMAM(self.client, room_jid, nick, password)