diff options
author | Nathan Fritz <fritzy@netflint.net> | 2011-08-12 16:32:09 -0700 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2011-08-12 16:32:09 -0700 |
commit | 0050c5112428939346397a4d2edfeb313c0fd497 (patch) | |
tree | 53e0997a217aee78a23678bbaa3fa250f54bd976 /sleekxmpp/plugins/xep_0060/stanza/pubsub.py | |
parent | 168203c94def5b4f88345e2564ecb0b973e8fc3f (diff) | |
download | slixmpp-0050c5112428939346397a4d2edfeb313c0fd497.tar.gz slixmpp-0050c5112428939346397a4d2edfeb313c0fd497.tar.bz2 slixmpp-0050c5112428939346397a4d2edfeb313c0fd497.tar.xz slixmpp-0050c5112428939346397a4d2edfeb313c0fd497.zip |
updated pubsub plugin to use stanzas
Diffstat (limited to 'sleekxmpp/plugins/xep_0060/stanza/pubsub.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0060/stanza/pubsub.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sleekxmpp/plugins/xep_0060/stanza/pubsub.py b/sleekxmpp/plugins/xep_0060/stanza/pubsub.py index 96655942..68e4f952 100644 --- a/sleekxmpp/plugins/xep_0060/stanza/pubsub.py +++ b/sleekxmpp/plugins/xep_0060/stanza/pubsub.py @@ -23,9 +23,15 @@ class Affiliation(ElementBase): namespace = 'http://jabber.org/protocol/pubsub' name = 'affiliation' plugin_attrib = name - interfaces = set(('node', 'affiliation')) + interfaces = set(('node', 'affiliation', 'jid')) plugin_attrib_map = {} plugin_tag_map = {} + + def setJid(self, value): + self._setAttr('jid', str(value)) + + def getJid(self): + return JID(self._getAttr('jid')) class Affiliations(ElementBase): namespace = 'http://jabber.org/protocol/pubsub' @@ -36,12 +42,6 @@ class Affiliations(ElementBase): plugin_tag_map = {} subitem = (Affiliation,) - def append(self, affiliation): - if not isinstance(affiliation, Affiliation): - raise TypeError - self.xml.append(affiliation.xml) - return self.iterables.append(affiliation) - registerStanzaPlugin(Pubsub, Affiliations) @@ -164,7 +164,7 @@ class Unsubscribe(ElementBase): namespace = 'http://jabber.org/protocol/pubsub' name = 'unsubscribe' plugin_attrib = name - interfaces = set(('node', 'jid')) + interfaces = set(('node', 'jid', 'subid')) plugin_attrib_map = {} plugin_tag_map = {} |