From bae3cfd112d2cb8fd5aba91ce17dcff1021a24b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Mon, 14 Oct 2019 18:20:19 +0200 Subject: Add Security Labels (XEP-0258) support --- nbxmpp/structs.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nbxmpp/structs.py') 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): -- cgit v1.2.3