1"""
2    Slixmpp: The Slick XMPP Library
3    Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net>
4    This file is part of Slixmpp.
5
6    See the file LICENSE for copying permissio
7"""
8
9from slixmpp.stanza import Message
10from slixmpp.xmlstream import (
11    ElementBase,
12    register_stanza_plugin,
13)
14
15
16NS = 'urn:xmpp:sid:0'
17
18
19class StanzaID(ElementBase):
20    namespace = NS
21    name = 'stanza-id'
22    plugin_attrib = 'stanza_id'
23    interfaces = {'id', 'by'}
24
25
26class OriginID(ElementBase):
27    namespace = NS
28    name = 'origin-id'
29    plugin_attrib = 'origin_id'
30    interfaces = {'id'}
31
32
33def register_plugins():
34    register_stanza_plugin(Message, StanzaID)
35    register_stanza_plugin(Message, OriginID)
36