summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLink Mauve <linkmauve@linkmauve.fr>2022-07-12 13:28:02 +0200
committerLink Mauve <linkmauve@linkmauve.fr>2022-07-12 13:28:02 +0200
commitb8f301b26fd1cc5f9b12263c79422e8be904b15b (patch)
tree02b03b1df31114fc2844f47ddff2fdf75c4cc1e7
parentffaeb312193f06c1bb35902f199798b1baa07d21 (diff)
parent60df4ef7aa6e17da329777f9dc66f9bc8ebbe901 (diff)
downloadslixmpp-b8f301b26fd1cc5f9b12263c79422e8be904b15b.tar.gz
slixmpp-b8f301b26fd1cc5f9b12263c79422e8be904b15b.tar.bz2
slixmpp-b8f301b26fd1cc5f9b12263c79422e8be904b15b.tar.xz
slixmpp-b8f301b26fd1cc5f9b12263c79422e8be904b15b.zip
Merge branch 'affs-outcast-jid' into 'master'
xep_0045: Require JID when setting outcast affiliation See merge request poezio/slixmpp!188
-rw-r--r--slixmpp/plugins/xep_0045/muc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0045/muc.py b/slixmpp/plugins/xep_0045/muc.py
index e5971bee..90cb73d7 100644
--- a/slixmpp/plugins/xep_0045/muc.py
+++ b/slixmpp/plugins/xep_0045/muc.py
@@ -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)