From a3d343b2530a3cafa5b1d715823917dd432917a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 29 May 2020 17:36:09 +0200 Subject: [PATCH] XEP-0045: Add MUCMessage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- slixmpp/plugins/xep_0045/stanza.py | 54 +++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/slixmpp/plugins/xep_0045/stanza.py b/slixmpp/plugins/xep_0045/stanza.py index 61aca7de..2db83baf 100644 --- a/slixmpp/plugins/xep_0045/stanza.py +++ b/slixmpp/plugins/xep_0045/stanza.py @@ -19,7 +19,7 @@ NS_ADMIN = 'http://jabber.org/protocol/muc#admin' NS_OWNER = 'http://jabber.org/protocol/muc#owner' -class MUCPresence(ElementBase): +class MUCBase(ElementBase): name = 'x' namespace = NS_USER plugin_attrib = 'muc' @@ -89,17 +89,61 @@ class MUCPresence(ElementBase): return self.parent()['from'].bare def set_nick(self, value): - log.warning("Cannot set nick through mucpresence plugin.") + log.warning( + "Cannot set nick through the %s plugin.", + self.__class__.__name__, + ) return self def set_room(self, value): - log.warning("Cannot set room through mucpresence plugin.") + log.warning( + "Cannot set room through the %s plugin.", + self.__class__.__name__, + ) return self def del_nick(self): - log.warning("Cannot delete nick through mucpresence plugin.") + log.warning( + "Cannot delete nick through the %s plugin.", + self.__class__.__name__, + ) return self def del_room(self): - log.warning("Cannot delete room through mucpresence plugin.") + log.warning( + "Cannot delete room through the %s plugin.", + self.__class__.__name__, + ) return self + + +class MUCPresence(MUCBase): + ''' + A MUC Presence + + + + + + + + ''' + + +class MUCMessage(MUCBase): + ''' + A MUC Message + + + Foo + + + + + '''