xep_0384: add helper to access .text

This commit is contained in:
Maxime “pep” Buquet 2018-05-14 11:09:29 +02:00
parent 9a3effbe40
commit 78f42fde5c

View file

@ -132,7 +132,17 @@ class PreKeyPublic(ElementBase):
namespace = OMEMO_BASE_NS
name = 'preKeyPublic'
plugin_attrib = name
interfaces = {'preKeyId'}
plugin_multi_attrib = 'prekeys'
interfaces = {'preKeyId', '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 = ''
register_stanza_plugin(Message, Encrypted)