Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0045.py @ 2728:1b11da85492c
plugin XEP-0045: fixed bad MAM detection on join
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 26 Dec 2018 17:21:39 +0100 |
parents | 35a0ab3032bb |
children | 003b8b4b56a7 |
comparison
equal
deleted
inserted
replaced
2727:59ac9284dee8 | 2728:1b11da85492c |
---|---|
933 # callback is done now that all needed Deferred have been added to _history_d | 933 # callback is done now that all needed Deferred have been added to _history_d |
934 room._history_d.callback(None) | 934 room._history_d.callback(None) |
935 | 935 |
936 defer.returnValue(room) | 936 defer.returnValue(room) |
937 | 937 |
938 @defer.inlineCallbacks | |
938 def join(self, room_jid, nick, password=None): | 939 def join(self, room_jid, nick, password=None): |
939 if (not self._mam or not self.host.hasFeature(self.client, | 940 has_mam = yield self.host.hasFeature(self.client, mam.NS_MAM, room_jid) |
940 mam.NS_MAM, room_jid)): | 941 if not self._mam or not has_mam: |
941 return self._joinLegacy(self.client, room_jid, nick, password) | 942 room = yield self._joinLegacy(self.client, room_jid, nick, password) |
942 else: | 943 defer.returnValue(room) |
943 return self._joinMAM(self.client, room_jid, nick, password) | 944 else: |
945 room = yield self._joinMAM(self.client, room_jid, nick, password) | |
946 defer.returnValue(room) | |
944 | 947 |
945 ## presence/roster ## | 948 ## presence/roster ## |
946 | 949 |
947 def availableReceived(self, presence): | 950 def availableReceived(self, presence): |
948 """ | 951 """ |