Ticket #22: pubsub-request-subscriptions.diff

File pubsub-request-subscriptions.diff, 900 bytes (added by mmalone, 13 years ago)

pubsub request-subscriptions patch

  • wokkel/pubsub.py

     
    702702        def toResponse(result):
    703703            response = domish.Element((NS_PUBSUB, 'pubsub'))
    704704            subscriptions = response.addElement('subscriptions')
    705             for node, subscriber, state in result:
     705            for subscription in result:
    706706                item = subscriptions.addElement('subscription')
    707                 item['node'] = node
    708                 item['jid'] = subscriber.full()
    709                 item['subscription'] = state
     707                item['node'] = subscription.nodeIdentifier
     708                item['jid'] = subscription.subscriber.full()
     709                item['subscription'] = subscription.state
    710710            return response
    711711
    712712        d = self.subscriptions(requestor, service)