summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLink Mauve <linkmauve@linkmauve.fr>2021-12-22 18:19:50 +0100
committerLink Mauve <linkmauve@linkmauve.fr>2021-12-22 18:19:50 +0100
commit237405e3a0dc9681a9313a91d60bd93131705b96 (patch)
tree96e540fa6910ff78399c00ae1529449e7c29df66
parent6fb4617732f5e61b611962e42dcd45c37f77358c (diff)
parent623d2cc27e5a130c3b2a029c819c1a6eb6e0bf3c (diff)
downloadslixmpp-237405e3a0dc9681a9313a91d60bd93131705b96.tar.gz
slixmpp-237405e3a0dc9681a9313a91d60bd93131705b96.tar.bz2
slixmpp-237405e3a0dc9681a9313a91d60bd93131705b96.tar.xz
slixmpp-237405e3a0dc9681a9313a91d60bd93131705b96.zip
Merge branch 'muc-presense-destroy' into 'master'
xep_0045: register_stanza_plugin(MUCPresence, MUCDestroy) See merge request poezio/slixmpp!175
-rw-r--r--slixmpp/plugins/xep_0045/muc.py2
-rw-r--r--slixmpp/plugins/xep_0045/stanza.py9
2 files changed, 11 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0045/muc.py b/slixmpp/plugins/xep_0045/muc.py
index 21f5c896..52988d44 100644
--- a/slixmpp/plugins/xep_0045/muc.py
+++ b/slixmpp/plugins/xep_0045/muc.py
@@ -35,6 +35,7 @@ from slixmpp.plugins.xep_0045 import stanza
from slixmpp.plugins.xep_0045.stanza import (
MUCInvite,
MUCDecline,
+ MUCDestroy,
MUCPresence,
MUCJoin,
MUCMessage,
@@ -88,6 +89,7 @@ class XEP_0045(BasePlugin):
register_stanza_plugin(MUCMessage, MUCStatus)
register_stanza_plugin(MUCPresence, MUCStatus)
register_stanza_plugin(Presence, MUCPresence)
+ register_stanza_plugin(MUCPresence, MUCDestroy)
register_stanza_plugin(Presence, MUCJoin)
register_stanza_plugin(MUCJoin, MUCHistory)
register_stanza_plugin(Message, MUCMessage)
diff --git a/slixmpp/plugins/xep_0045/stanza.py b/slixmpp/plugins/xep_0045/stanza.py
index 428dbce7..6c3d2244 100644
--- a/slixmpp/plugins/xep_0045/stanza.py
+++ b/slixmpp/plugins/xep_0045/stanza.py
@@ -235,6 +235,7 @@ class MUCOwnerQuery(ElementBase):
class MUCOwnerDestroy(ElementBase):
name = 'destroy'
plugin_attrib = 'destroy'
+ namespace = NS_OWNER
interfaces = {'reason', 'jid'}
sub_interfaces = {'reason'}
@@ -288,3 +289,11 @@ class MUCActor(ElementBase):
if jid:
return JID(jid)
return jid
+
+
+class MUCDestroy(ElementBase):
+ name = 'destroy'
+ plugin_attrib = 'destroy'
+ namespace = NS_USER
+ interfaces = {'reason', 'jid'}
+ sub_interfaces = {'reason'}