fixed setRole function, the check where made against 'affiliation' values, now we do that against actual role values

This commit is contained in:
Allan Simon 2014-02-07 12:11:28 +08:00
parent eb6ac68d5c
commit c8d6e512d2

View file

@ -304,7 +304,7 @@ class XEP_0045(BasePlugin):
room), whereas affiliations are permanent (they last across groupchat room), whereas affiliations are permanent (they last across groupchat
sessions). sessions).
""" """
if role not in ('outcast', 'member', 'admin', 'owner', 'none'): if role not in ('moderator', 'participant', 'visitor', 'none'):
raise TypeError raise TypeError
query = ET.Element('{http://jabber.org/protocol/muc#admin}query') query = ET.Element('{http://jabber.org/protocol/muc#admin}query')
item = ET.Element('item', {'role':role, 'nick':nick}) item = ET.Element('item', {'role':role, 'nick':nick})