comparison src/plugins/plugin_misc_groupblog.py @ 770:64dd7c0f4feb

plugin groupblog, XEP-0277: store both published and updated timestamps
author souliane <souliane@mailoo.org>
date Thu, 19 Dec 2013 13:54:40 +0100
parents 812dc38c0094
children bfabeedbf32e
comparison
equal deleted inserted replaced
769:8b6137f7b4e1 770:64dd7c0f4feb
409 mblog_data['rich'] = extra['rich'] 409 mblog_data['rich'] = extra['rich']
410 service, node, item_id = pub_data 410 service, node, item_id = pub_data
411 if comments: 411 if comments:
412 node = self.getNodeName(client.jid) 412 node = self.getNodeName(client.jid)
413 mblog_data['id'] = str(item_id) 413 mblog_data['id'] = str(item_id)
414 if 'published' in extra:
415 mblog_data['published'] = extra['published']
414 if extra.get('allow_comments', 'False').lower() == 'true': 416 if extra.get('allow_comments', 'False').lower() == 'true':
415 comments_node = self.host.plugins["XEP-0277"].parseCommentUrl(comments)[1] 417 comments_node = self.host.plugins["XEP-0277"].parseCommentUrl(comments)[1]
416 # we could use comments_node directly but it's safer to rebuild it 418 # we could use comments_node directly but it's safer to rebuild it
417 # XXX: use the item identifier? http://bugs.goffi.org/show_bug.cgi?id=63 419 # XXX: use the item identifier? http://bugs.goffi.org/show_bug.cgi?id=63
418 hash_ = comments_node.split('_')[1].split('__')[0] 420 hash_ = comments_node.split('_')[1].split('__')[0]