blob: db8e9fff6215825ad0ad7abb7abdbbda868d89cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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)
|