comparison sat/plugins/plugin_xep_0060.py @ 2776:838f53730ce4

plugin pubsub admin: pubsub administrator first draft: This experimental protocol allows to publish items where publishers can be specified.
author Goffi <goffi@goffi.org>
date Tue, 15 Jan 2019 08:51:54 +0100
parents 003b8b4b56a7
children 3b68293a60d4
comparison
equal deleted inserted replaced
2775:2dfd5b1d39df 2776:838f53730ce4
427 # """ 427 # """
428 # d = self.subscriptions(service, nodeIdentifier, profile_key=profile) 428 # d = self.subscriptions(service, nodeIdentifier, profile_key=profile)
429 # d.addCallback(lambda subs: [sub.getAttribute('node') for sub in subs if sub.getAttribute('subscription') == filter_]) 429 # d.addCallback(lambda subs: [sub.getAttribute('node') for sub in subs if sub.getAttribute('subscription') == filter_])
430 # return d 430 # return d
431 431
432 def _sendItem( 432 def _sendItem(self, service, nodeIdentifier, payload, item_id=None, extra=None,
433 self, 433 profile_key=C.PROF_KEY_NONE):
434 service,
435 nodeIdentifier,
436 payload,
437 item_id=None,
438 extra=None,
439 profile_key=C.PROF_KEY_NONE,
440 ):
441 client = self.host.getClient(profile_key) 434 client = self.host.getClient(profile_key)
442 service = None if not service else jid.JID(service) 435 service = None if not service else jid.JID(service)
443 d = self.sendItem( 436 d = self.sendItem(
444 client, service, nodeIdentifier, payload, item_id or None, extra 437 client, service, nodeIdentifier, payload, item_id or None, extra
445 ) 438 )