Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0277.py @ 1741:cc31dd72526d
plugin misc_extra_pep: use a user parameter (jids_list) instead of a general configuration value
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 11 Dec 2015 09:12:11 +0100 |
parents | 56fa4e7e158c |
children | 6fd0881fe1fc |
comparison
equal
deleted
inserted
replaced
1740:681fe91abcc0 | 1741:cc31dd72526d |
---|---|
652 jids_set = set(publishers) | 652 jids_set = set(publishers) |
653 else: | 653 else: |
654 jids_set = client.roster.getJidsSet(publishers_type, publishers) | 654 jids_set = client.roster.getJidsSet(publishers_type, publishers) |
655 if publishers_type == C.ALL: | 655 if publishers_type == C.ALL: |
656 try: # display messages from salut-a-toi@libervia.org or other PEP services | 656 try: # display messages from salut-a-toi@libervia.org or other PEP services |
657 services = self.host.plugins["EXTRA-PEP"].getConfig("get_items_from_list") | 657 services = self.host.plugins["EXTRA-PEP"].getFollowedEntities(profile_key) |
658 except KeyError: | 658 except KeyError: |
659 pass | 659 pass # plugin is not loaded |
660 else: | 660 else: |
661 log.debug("Items from the following extra PEP services will be requested as well: %s" % ", ".join(services)) | 661 if services: |
662 jids_set.update([jid.JID(service) for service in services]) | 662 log.debug("Extra PEP followed entities: %s" % ", ".join([unicode(service) for service in services])) |
663 jids_set.update(services) | |
663 | 664 |
664 node_data = [] | 665 node_data = [] |
665 for jid_ in jids_set: | 666 for jid_ in jids_set: |
666 node_data.append((jid_, NS_MICROBLOG)) | 667 node_data.append((jid_, NS_MICROBLOG)) |
667 return client, node_data | 668 return client, node_data |