Catch mediated invites only if type is normal

https://xmpp.org/extensions/xep-0045.html#invite-mediated
This commit is contained in:
Philipp Hörist 2018-12-19 15:47:11 +01:00
parent 5f555193c7
commit ce6839957d
1 changed files with 4 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class MUC:
self.handlers = [
('message', self._on_config_change, '', nbxmpp.NS_MUC_USER),
('message', self._mediated_invite, '', nbxmpp.NS_MUC_USER),
('message', self._mediated_invite, 'normal', nbxmpp.NS_MUC_USER),
('message', self._direct_invite, '', nbxmpp.NS_CONFERENCE),
('message', self._on_captcha_challenge, '', nbxmpp.NS_CAPTCHA),
]
@ -340,6 +340,9 @@ class MUC:
if stanza.getType() == 'error':
return
if stanza.getBody():
return
decline = muc_user.getTag('decline')
if decline is not None: