# HG changeset patch # User Kim Alvefur # Date 1554048530 -7200 # Node ID d94875c3ddda5443fe2b7f416d9a5e36bb1d8be8 # Parent f756e051fa02b4a16fec6fb6c508aedb14c1e2f3 mod_pubsub_github: Publish with item id set to commit hash (BC) diff -r f756e051fa02 -r d94875c3ddda mod_pubsub_github/mod_pubsub_github.lua --- a/mod_pubsub_github/mod_pubsub_github.lua Sun Mar 31 18:04:11 2019 +0200 +++ b/mod_pubsub_github/mod_pubsub_github.lua Sun Mar 31 18:08:50 2019 +0200 @@ -38,8 +38,8 @@ end -- else .. is this even github? for _, commit in ipairs(data.commits) do - local ok, err = pubsub_service:publish(node, github_actor, data.repository.name, - st.stanza("item", { id = data.repository.name, xmlns = "http://jabber.org/protocol/pubsub" }) + local ok, err = pubsub_service:publish(node, github_actor, commit.id, + st.stanza("item", { id = commit.id, xmlns = "http://jabber.org/protocol/pubsub" }) :tag("entry", { xmlns = "http://www.w3.org/2005/Atom" }) :tag("id"):text(commit.id):up() :tag("title"):text(commit.message):up()