plugins groupblog (xep-0060, xep-0277): added blog item modification/deletion
This commit is contained in:
parent
7d3f74ef62
commit
481bee01c2
1 changed files with 105 additions and 5 deletions
|
|
@ -173,7 +173,8 @@ class XEP_0277(object):
|
|||
_entry.author = atom.Author()
|
||||
_entry.author.name = data.get('author', self.host.getJidNStream(profile)[0].userhost()).encode('utf-8')
|
||||
_entry.updated = float(data.get('timestamp', time()))
|
||||
_entry.id = str(_uuid)
|
||||
entry_id = data.get('id', str(_uuid))
|
||||
_entry.id = entry_id
|
||||
if 'comments' in data:
|
||||
link = atom.Link()
|
||||
link.attrs['href'] = data['comments']
|
||||
|
|
@ -181,8 +182,7 @@ class XEP_0277(object):
|
|||
link.attrs['title'] = 'comments'
|
||||
_entry.links.append(link)
|
||||
_entry_elt = ElementParser()(str(_entry).decode('utf-8'))
|
||||
item = pubsub.Item(payload=_entry_elt)
|
||||
item['id'] = _uuid
|
||||
item = pubsub.Item(id=entry_id, payload=_entry_elt)
|
||||
defer.returnValue(item)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
|
|||
Loading…
Reference in a new issue