plugin 0249: fixed invitation handling + some improvments:
- properly retrieve payload by namespace - now use a trigger instead of observer, so the message workflow is stopped if an invitation is found - namespace is registered fix 241
This commit is contained in:
parent
7459275a68
commit
692a5b34fc
1 changed files with 42 additions and 42 deletions
|
|
@ -482,13 +482,19 @@ class XEP_0045(object):
|
|||
options = {}
|
||||
if room_jid in client._muc_client.joined_rooms:
|
||||
room = client._muc_client.joined_rooms[room_jid]
|
||||
log.info(_(u'{profile} is already in room {room_jid}').format(profile=client.profile, room_jid = room_jid.userhost()))
|
||||
log.info(_(u'{profile} is already in room {room_jid}').format(
|
||||
profile=client.profile, room_jid = room_jid.userhost()))
|
||||
return defer.fail(AlreadyJoined(room))
|
||||
log.info(_(u"[{profile}] is joining room {room} with nick {nick}").format(profile=client.profile, room=room_jid.userhost(), nick=nick))
|
||||
log.info(_(u"[{profile}] is joining room {room} with nick {nick}").format(
|
||||
profile=client.profile, room=room_jid.userhost(), nick=nick))
|
||||
|
||||
password = options.get("password")
|
||||
|
||||
return client._muc_client.join(room_jid, nick, password).addCallbacks(self._joinCb, self._joinEb, (client, room_jid, nick), errbackArgs=(client, room_jid, nick, password))
|
||||
d = client._muc_client.join(room_jid, nick, password)
|
||||
d.addCallbacks(self._joinCb, self._joinEb,
|
||||
(client, room_jid, nick),
|
||||
errbackArgs=(client, room_jid, nick, password))
|
||||
return d
|
||||
|
||||
def _nick(self, room_jid_s, nick, profile_key=C.PROF_KEY_NONE):
|
||||
client = self.host.getClient(profile_key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue