mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop
This commit is contained in:
commit
33ac0c9dd6
1 changed files with 25 additions and 0 deletions
|
@ -243,6 +243,31 @@ class Options(ElementBase):
|
||||||
registerStanzaPlugin(Pubsub, Options)
|
registerStanzaPlugin(Pubsub, Options)
|
||||||
registerStanzaPlugin(Subscribe, Options)
|
registerStanzaPlugin(Subscribe, Options)
|
||||||
|
|
||||||
|
class PublishOptions(ElementBase):
|
||||||
|
namespace = 'http://jabber.org/protocol/pubsub'
|
||||||
|
name = 'publish-options'
|
||||||
|
plugin_attrib = 'publish_options'
|
||||||
|
interfaces = set(('publish_options'))
|
||||||
|
plugin_attrib_map = {}
|
||||||
|
plugin_tag_map = {}
|
||||||
|
|
||||||
|
def get_publish_options(self):
|
||||||
|
config = self.xml.find('{jabber:x:data}x')
|
||||||
|
form = xep_0004.Form()
|
||||||
|
if config is not None:
|
||||||
|
form.fromXML(config)
|
||||||
|
return form
|
||||||
|
|
||||||
|
def set_publish_options(self, value):
|
||||||
|
self.xml.append(value.getXML())
|
||||||
|
return self
|
||||||
|
|
||||||
|
def del_publish_options(self):
|
||||||
|
config = self.xml.find('{jabber:x:data}x')
|
||||||
|
self.xml.remove(config)
|
||||||
|
|
||||||
|
registerStanzaPlugin(Pubsub, PublishOptions)
|
||||||
|
|
||||||
class PubsubState(ElementBase):
|
class PubsubState(ElementBase):
|
||||||
namespace = 'http://jabber.org/protocol/psstate'
|
namespace = 'http://jabber.org/protocol/psstate'
|
||||||
name = 'state'
|
name = 'state'
|
||||||
|
|
Loading…
Reference in a new issue