summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-11-22 17:09:58 +0100
committermathieui <mathieui@mathieui.net>2020-11-22 18:11:18 +0100
commitfe46643f2ff479e9cf3735e241c5dba6ace62b5d (patch)
treebf5611b3ac33c14d0a2ad27b45bc6eda848b30c0
parent985505297c259656d101a133d1b007224fb9fdb9 (diff)
downloadslixmpp-fe46643f2ff479e9cf3735e241c5dba6ace62b5d.tar.gz
slixmpp-fe46643f2ff479e9cf3735e241c5dba6ace62b5d.tar.bz2
slixmpp-fe46643f2ff479e9cf3735e241c5dba6ace62b5d.tar.xz
slixmpp-fe46643f2ff479e9cf3735e241c5dba6ace62b5d.zip
XEP-0045: add more stanza elements
-rw-r--r--slixmpp/plugins/xep_0045/stanza.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0045/stanza.py b/slixmpp/plugins/xep_0045/stanza.py
index 2db83baf..9756790b 100644
--- a/slixmpp/plugins/xep_0045/stanza.py
+++ b/slixmpp/plugins/xep_0045/stanza.py
@@ -147,3 +147,52 @@ class MUCMessage(MUCBase):
</x>
</message>
'''
+
+class MUCJoin(ElementBase):
+ name = 'x'
+ namespace = NS
+ plugin_attrib = 'muc_join'
+ interfaces = {'password'}
+ sub_interfaces = {'password'}
+
+
+class MUCInvite(ElementBase):
+ name = 'invite'
+ plugin_attrib = 'invite'
+ namespace = NS_USER
+ interfaces = {'to', 'reason'}
+ sub_interfaces = {'reason'}
+
+
+class MUCHistory(ElementBase):
+ name = 'history'
+ plugin_attrib = 'history'
+ namespace = NS
+ interfaces = {'maxchars', 'maxstanzas', 'since', 'seconds'}
+
+
+class MUCOwnerQuery(ElementBase):
+ name = 'query'
+ plugin_attrib = 'mucowner_query'
+ namespace = NS_OWNER
+
+
+class MUCOwnerDestroy(ElementBase):
+ name = 'destroy'
+ plugin_attrib = 'destroy'
+ interfaces = {'reason', 'jid'}
+ sub_interfaces = {'reason'}
+
+
+class MUCAdminQuery(ElementBase):
+ name = 'query'
+ plugin_attrib = 'mucadmin_query'
+ namespace = NS_ADMIN
+
+
+class MUCAdminItem(ElementBase):
+ namespace = NS_ADMIN
+ name = 'item'
+ plugin_attrib = 'item'
+ interfaces = {'role', 'affiliation', 'nick', 'jid'}
+