Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-10-14 19:20:19 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-10-14 19:20:19 +0300
commitbae3cfd112d2cb8fd5aba91ce17dcff1021a24b9 (patch)
tree2c9d9e8316316ca7fc4200f26570585336234648 /nbxmpp/structs.py
parent8cc2f1d3e7babb442a259d21bad5635345f8466f (diff)
Add Security Labels (XEP-0258) support
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r--nbxmpp/structs.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py
index 98b28bc..eeea660 100644
--- a/nbxmpp/structs.py
+++ b/nbxmpp/structs.py
@@ -125,6 +125,9 @@ OOBData = namedtuple('OOBData', 'url desc')
CorrectionData = namedtuple('CorrectionData', 'id')
+DisplayMarking = namedtuple('DisplayMarking', 'label fgcolor bgcolor')
+SecurityLabel = namedtuple('SecurityLabel', 'displaymarking')
+
class DiscoInfo(namedtuple('DiscoInfo', 'stanza identities features dataforms timestamp')):
@@ -554,6 +557,7 @@ class MessageProperties:
self.attention = False
self.forms = None
self.xhtml = None
+ self.security_label = None
@property
def has_user_delay(self):
@@ -654,6 +658,10 @@ class MessageProperties:
def has_xhtml(self):
return self.xhtml is not None
+ @property
+ def has_security_label(self):
+ return self.security_label is not None
+
class IqProperties:
def __init__(self):