plugin XEP-0045: fixed bad MAM detection on join
This commit is contained in:
parent
6852b6b677
commit
d3d39bad5d
1 changed files with 7 additions and 4 deletions
|
|
@ -935,12 +935,15 @@ class SatMUCClient(muc.MUCClient):
|
|||
|
||||
defer.returnValue(room)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def join(self, room_jid, nick, password=None):
|
||||
if (not self._mam or not self.host.hasFeature(self.client,
|
||||
mam.NS_MAM, room_jid)):
|
||||
return self._joinLegacy(self.client, room_jid, nick, password)
|
||||
has_mam = yield self.host.hasFeature(self.client, mam.NS_MAM, room_jid)
|
||||
if not self._mam or not has_mam:
|
||||
room = yield self._joinLegacy(self.client, room_jid, nick, password)
|
||||
defer.returnValue(room)
|
||||
else:
|
||||
return self._joinMAM(self.client, room_jid, nick, password)
|
||||
room = yield self._joinMAM(self.client, room_jid, nick, password)
|
||||
defer.returnValue(room)
|
||||
|
||||
## presence/roster ##
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue