xep_0384: Add interface for .text on Key element

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2018-05-23 21:08:59 +01:00
parent 8b2348698e
commit f38fbc6b60

View file

@ -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):