summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0439/stanza.py
diff options
context:
space:
mode:
authorLink Mauve <linkmauve@linkmauve.fr>2020-12-04 20:03:32 +0100
committerLink Mauve <linkmauve@linkmauve.fr>2020-12-04 20:03:32 +0100
commit05749c49690c00f2b1794212b2fb9281b6956a89 (patch)
tree06600402c84040badb8c51a84f683a2ca467ca13 /slixmpp/plugins/xep_0439/stanza.py
parente592a46c99888594bfb0bf71da99c88755912a37 (diff)
parentc2b09c5c8317d919d7df94b85ac92910de05904a (diff)
downloadslixmpp-05749c49690c00f2b1794212b2fb9281b6956a89.tar.gz
slixmpp-05749c49690c00f2b1794212b2fb9281b6956a89.tar.bz2
slixmpp-05749c49690c00f2b1794212b2fb9281b6956a89.tar.xz
slixmpp-05749c49690c00f2b1794212b2fb9281b6956a89.zip
Merge branch 'more-xeps' into 'master'
Add a batch of newer XEPs See merge request poezio/slixmpp!69
Diffstat (limited to 'slixmpp/plugins/xep_0439/stanza.py')
-rw-r--r--slixmpp/plugins/xep_0439/stanza.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0439/stanza.py b/slixmpp/plugins/xep_0439/stanza.py
new file mode 100644
index 00000000..e00e1f27
--- /dev/null
+++ b/slixmpp/plugins/xep_0439/stanza.py
@@ -0,0 +1,43 @@
+"""
+ Slixmpp: The Slick XMPP Library
+ Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net>
+ This file is part of Slixmpp.
+
+ See the file LICENSE for copying permissio
+"""
+
+from slixmpp.stanza import Message
+from slixmpp.xmlstream import (
+ ElementBase,
+ register_stanza_plugin,
+)
+
+
+NS = 'urn:xmpp:tmp:quick-response'
+
+
+class Response(ElementBase):
+ namespace = NS
+ name = 'response'
+ plugin_attrib = 'response'
+ interfaces = {'value', 'label'}
+
+
+class Action(ElementBase):
+ namespace = NS
+ name = 'action'
+ plugin_attrib = 'action'
+ interfaces = {'id', 'label'}
+
+
+class ActionSelected(ElementBase):
+ namespace = NS
+ name = 'action-selected'
+ plugin_attrib = 'action_selected'
+ interfaces = {'id'}
+
+
+def register_plugins():
+ register_stanza_plugin(Message, Action, iterable=True)
+ register_stanza_plugin(Message, ActionSelected)
+ register_stanza_plugin(Message, Response, iterable=True)