summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0359/stanza.py
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/plugins/xep_0359/stanza.py')
-rw-r--r--slixmpp/plugins/xep_0359/stanza.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0359/stanza.py b/slixmpp/plugins/xep_0359/stanza.py
new file mode 100644
index 00000000..db8e9fff
--- /dev/null
+++ b/slixmpp/plugins/xep_0359/stanza.py
@@ -0,0 +1,35 @@
+"""
+ 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:sid:0'
+
+
+class StanzaID(ElementBase):
+ namespace = NS
+ name = 'stanza-id'
+ plugin_attrib = 'stanza_id'
+ interfaces = {'id', 'by'}
+
+
+class OriginID(ElementBase):
+ namespace = NS
+ name = 'origin-id'
+ plugin_attrib = 'origin_id'
+ interfaces = {'id'}
+
+
+def register_plugins():
+ register_stanza_plugin(Message, StanzaID)
+ register_stanza_plugin(Message, OriginID)