comparison src/plugins/plugin_xep_0277.py @ 1671:1895846fc9cb

plugin XEP-0277, group blog: added item2data trigger + group permission are parsed when receiving a new item
author Goffi <goffi@goffi.org>
date Wed, 25 Nov 2015 10:45:22 +0100
parents 5d0ff155be1a
children 9ff4f60de005
comparison
equal deleted inserted replaced
1670:3690b4d4157e 1671:1895846fc9cb
316 microblog_data['author_email'] = unicode(email_elt) 316 microblog_data['author_email'] = unicode(email_elt)
317 317
318 # categories 318 # categories
319 categories = (category_elt.getAttribute('term','') for category_elt in entry_elt.elements(NS_ATOM, 'category')) 319 categories = (category_elt.getAttribute('term','') for category_elt in entry_elt.elements(NS_ATOM, 'category'))
320 common.iter2dict('tag', categories, microblog_data) 320 common.iter2dict('tag', categories, microblog_data)
321
322 ## the trigger ##
323 # if other plugins have things to add or change
324 yield self.host.trigger.point("XEP-0277_item2data", item_elt, entry_elt, microblog_data)
321 325
322 defer.returnValue(microblog_data) 326 defer.returnValue(microblog_data)
323 327
324 @defer.inlineCallbacks 328 @defer.inlineCallbacks
325 def data2entry(self, data, item_id=None, profile=C.PROF_KEY_NONE): 329 def data2entry(self, data, item_id=None, profile=C.PROF_KEY_NONE):