Merge branch 'affs-outcast-jid' into 'master'
xep_0045: Require JID when setting outcast affiliation See merge request poezio/slixmpp!188
This commit is contained in:
commit
b8f301b26f
1 changed files with 2 additions and 0 deletions
|
@ -493,6 +493,8 @@ class XEP_0045(BasePlugin):
|
|||
"""
|
||||
if affiliation not in AFFILIATIONS:
|
||||
raise ValueError('%s is not a valid affiliation' % affiliation)
|
||||
if affiliation == 'outcast' and not jid:
|
||||
raise ValueError('Outcast affiliation requires a using a jid')
|
||||
if not any((jid, nick)):
|
||||
raise ValueError('One of jid or nick must be set')
|
||||
iq = self.xmpp.make_iq_set(ito=room, ifrom=ifrom)
|
||||
|
|
Loading…
Reference in a new issue