tmp(wokkel/pubsub): removed affiliations attribute which was there twice + added missing _render_affiliations

This commit is contained in:
Goffi 2017-03-26 16:57:53 +02:00
commit b211d3afe6

View file

@ -287,7 +287,6 @@ class PubSubRequest(generic.Stanza):
verb = None
affiliations = None
items = None
itemIdentifiers = None
maxItems = None
@ -615,6 +614,11 @@ class PubSubRequest(generic.Stanza):
self.affiliations[entity] = affiliation
def _render_affiliations(self, verbElement):
for entity, affiliation in self.affiliations.iteritems():
affiliationElement = verbElement.addElement((NS_PUBSUB_OWNER, 'affiliation'))
affiliationElement['jid'] = entity.full()
affiliationElement['affiliation'] = affiliation
def _parse_notify(self, verbElement):
value = verbElement.getAttribute('notify')