xep_0384: Allowing editing .text with 'value' attr
This commit is contained in:
parent
abbc5c7909
commit
186ab44b23
1 changed files with 30 additions and 3 deletions
33
stanza.py
33
stanza.py
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue