Add MAM archived tags
This commit is contained in:
parent
ad7a57103d
commit
a2784be4d6
2 changed files with 15 additions and 0 deletions
|
@ -36,6 +36,7 @@ class XEP_0313(BasePlugin):
|
|||
register_stanza_plugin(Iq, stanza.MAM)
|
||||
register_stanza_plugin(Iq, stanza.Preferences)
|
||||
register_stanza_plugin(Message, stanza.Result)
|
||||
register_stanza_plugin(Message, stanza.Archived, iterable=True)
|
||||
register_stanza_plugin(stanza.Result, self.xmpp['xep_0297'].stanza.Forwarded)
|
||||
register_stanza_plugin(stanza.MAM, self.xmpp['xep_0059'].stanza.Set)
|
||||
|
||||
|
|
|
@ -123,3 +123,17 @@ class Result(ElementBase):
|
|||
namespace = 'urn:xmpp:mam:tmp'
|
||||
plugin_attrib = 'mam_result'
|
||||
interfaces = set(['queryid', 'id'])
|
||||
|
||||
|
||||
class Archived(ElementBase):
|
||||
name = 'archived'
|
||||
namespace = 'urn:xmpp:mam:tmp'
|
||||
plugin_attrib = 'mam_archived'
|
||||
plugin_multi_attrib = 'mam_archives'
|
||||
interfaces = set(['by', 'id'])
|
||||
|
||||
def get_by(self):
|
||||
return JID(self._get_attr('by'))
|
||||
|
||||
def set_by(self):
|
||||
return self._set_attr('by', str(value))
|
||||
|
|
Loading…
Reference in a new issue