Correct an MUC-related error message which indicates the requirement of a JID

This commit is contained in:
sch 2024-06-20 19:00:20 +00:00
parent c8c0bb9134
commit e96f8e1ed0

View File

@ -493,7 +493,7 @@ class XEP_0045(BasePlugin):
if affiliation not in AFFILIATIONS: if affiliation not in AFFILIATIONS:
raise ValueError('%s is not a valid affiliation' % affiliation) raise ValueError('%s is not a valid affiliation' % affiliation)
if affiliation == 'outcast' and not jid: if affiliation == 'outcast' and not jid:
raise ValueError('Outcast affiliation requires a using a jid') raise ValueError('Outcast affiliation requires using a jid')
if not any((jid, nick)): if not any((jid, nick)):
raise ValueError('One of jid or nick must be set') raise ValueError('One of jid or nick must be set')
iq = self.xmpp.make_iq_set(ito=room, ifrom=ifrom) iq = self.xmpp.make_iq_set(ito=room, ifrom=ifrom)