comparison src/plugins/plugin_xep_0277.py @ 1699:a72f04c67ac9

plugin XEP-0277: just a reminder
author Goffi <goffi@goffi.org>
date Fri, 27 Nov 2015 17:53:13 +0100
parents c6c835046681
children 6d6eae490681
comparison
equal deleted inserted replaced
1698:7923dc51143e 1699:a72f04c67ac9
506 @param node(unicode): PubSub node to use (defaut to microblog NS) 506 @param node(unicode): PubSub node to use (defaut to microblog NS)
507 @param data(dict): microblog data (must include at least a "content" or a "title" key). 507 @param data(dict): microblog data (must include at least a "content" or a "title" key).
508 see http://wiki.goffi.org/wiki/Bridge_API_-_Microblogging/en for details 508 see http://wiki.goffi.org/wiki/Bridge_API_-_Microblogging/en for details
509 @param profile: %(doc_profile)s 509 @param profile: %(doc_profile)s
510 """ 510 """
511 # TODO: check that all data keys are used, this would avoid sending publicly a private message
512 # by accident (e.g. if group pluging is not loaded, and "grou*" key are not used)
511 assert profile is not None 513 assert profile is not None
512 514
513 item_id = data.get('id') or unicode(uuid.uuid4()) 515 item_id = data.get('id') or unicode(uuid.uuid4())
514 try: 516 try:
515 yield self._manageComments(self._p.ACCESS_OPEN, data, service, node, item_id, profile) 517 yield self._manageComments(self._p.ACCESS_OPEN, data, service, node, item_id, profile)