From f38fbc6b6035e5e5baa5d5acada83922eb78d454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 23 May 2018 21:08:59 +0100 Subject: [PATCH] xep_0384: Add interface for .text on Key element MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- stanza.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/stanza.py b/stanza.py index 245df4c..4eaeb11 100644 --- a/stanza.py +++ b/stanza.py @@ -49,7 +49,16 @@ class Key(ElementBase): namespace = OMEMO_BASE_NS name = 'key' plugin_attrib = name - interfaces = {'rid', 'prekey'} + interfaces = {'rid', 'prekey', 'value'} + + def get_value(self): + return self.xml.text + + def set_value(self, value): + self.xml.text = str(value) + + def del_value(self): + self.xml.text = '' class IV(ElementBase):