summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-03 22:56:46 +0100
committermathieui <mathieui@mathieui.net>2020-12-03 23:28:27 +0100
commitfa7e33110fa7c9afd30145b04e3965e0bcecf7f3 (patch)
treec39562c1fcb9479ea11153c5d88cfea40b3f0ed7
parent7033bc00611e0fa3110fd7b48bb78400445c1db9 (diff)
downloadslixmpp-fa7e33110fa7c9afd30145b04e3965e0bcecf7f3.tar.gz
slixmpp-fa7e33110fa7c9afd30145b04e3965e0bcecf7f3.tar.bz2
slixmpp-fa7e33110fa7c9afd30145b04e3965e0bcecf7f3.tar.xz
slixmpp-fa7e33110fa7c9afd30145b04e3965e0bcecf7f3.zip
XEP-0045: Misc small fixes.
-rw-r--r--slixmpp/plugins/xep_0045/muc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0045/muc.py b/slixmpp/plugins/xep_0045/muc.py
index 29c03d6e..630112f3 100644
--- a/slixmpp/plugins/xep_0045/muc.py
+++ b/slixmpp/plugins/xep_0045/muc.py
@@ -226,6 +226,7 @@ class XEP_0045(BasePlugin):
async def destroy(self, room: JID, reason='', altroom='', *,
ifrom: Optional[JID] = None, **iqkwargs) -> Iq:
+ """Destroy a room."""
iq = self.xmpp.make_iq_set(ifrom=ifrom, ito=room)
iq.enable('mucowner_query')
iq['mucowner_query'].enable('destroy')
@@ -297,7 +298,6 @@ class XEP_0045(BasePlugin):
self.xmpp.send_presence(pshow='unavailable', pto="%s/%s" % (room, nick), pfrom=pfrom)
del self.rooms[room]
-
async def get_room_config(self, room: JID, ifrom=''):
"""Get the room config form in 0004 plugin format """
iq = self.xmpp.make_iq_get(stanza.NS_OWNER, ito=room, ifrom=ifrom)
@@ -354,7 +354,7 @@ class XEP_0045(BasePlugin):
return await iq.send(**iqkwargs)
async def send_role_list(self, room: JID, roles: List[Tuple[str, str]], *,
- ifrom: Optional[JID], **iqkwargs) -> Iq:
+ ifrom: Optional[JID] = None, **iqkwargs) -> Iq:
"""Send a role delta list"""
iq = self.xmpp.make_iq_set(ito=room, ifrom=ifrom)
for nick, affiliation in roles: