xep_0384: Allowing editing .text with 'value' attr

This commit is contained in:
Maxime “pep” Buquet 2018-05-13 14:26:54 +02:00
parent abbc5c7909
commit 186ab44b23

View file

@ -81,21 +81,48 @@ class SignedPreKeyPublic(ElementBase):
namespace = OMEMO_BASE_NS
name = 'signedPreKeyPublic'
plugin_attrib = name
interfaces = {'signedPreKeyId'}
interfaces = {'signedPreKeyId', 'value'}
def get_value(self):
return self.xml.text
def set_value(self, value):
self.xml.text = value
def del_value(self):
self.xml.text = ''
class SignedPreKeySignature(ElementBase):
namespace = OMEMO_BASE_NS
name = 'signedPreKeySignature'
plugin_attrib = name
interfaces = set()
interfaces = {'value'}
def get_value(self):
return self.xml.text
def set_value(self, value):
self.xml.text = value
def del_value(self):
self.xml.text = ''
class IdentityKey(ElementBase):
namespace = OMEMO_BASE_NS
name = 'identityKey'
plugin_attrib = name
interfaces = set()
interfaces = {'value'}
def get_value(self):
return self.xml.text
def set_value(self, value):
self.xml.text = value
def del_value(self):
self.xml.text = ''
class PreKeys(ElementBase):