Skip to content
Snippets Groups Projects
Commit 8520bc8c authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

do not set an id when we publish a new item on pubsub. Fixes #6947

parent 8a82e902
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ class ConnectionPubSub:
self.__callbacks[id_] = (cb, args, kwargs)
def send_pb_publish(self, jid, node, item, id_, options=None):
def send_pb_publish(self, jid, node, item, id_=None, options=None):
"""
Publish item to a node
"""
......@@ -85,7 +85,10 @@ class ConnectionPubSub:
query = xmpp.Iq('set', to=jid)
e = query.addChild('pubsub', namespace=xmpp.NS_PUBSUB)
p = e.addChild('publish', {'node': node})
p.addChild('item', {'id': id_}, [item])
attrs = {}
if id_:
attrs = {'id': id_}
p.addChild('item', attrs, [item])
if options:
p = e.addChild('publish-options')
p.addChild(node=options)
......
......@@ -61,7 +61,6 @@ class GroupsPostWindow:
author.addChild('name', {}, [self.from_entry.get_text()])
item.addChild('generator', {}, ['Gajim'])
item.addChild('title', {}, [self.subject_entry.get_text()])
item.addChild('id', {}, ['0'])
buf = self.contents_textview.get_buffer()
item.addChild('content', {}, [buf.get_text(buf.get_start_iter(), buf.get_end_iter())])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment