Changeset

9723:3c6e266391a2

mod_pep: Set an 'id' on notifications mod_pubsub got this in f2d35eee69c9
author Kim Alvefur <zash@zash.se>
date Sun, 23 Dec 2018 02:56:10 +0100
parents 9722:695fae2e16b2
children 9724:8e6a0e1c1876
files plugins/mod_pep.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pep.lua	Sun Dec 23 02:54:39 2018 +0100
+++ b/plugins/mod_pep.lua	Sun Dec 23 02:56:10 2018 +0100
@@ -8,6 +8,7 @@
 local is_contact_subscribed = require "core.rostermanager".is_contact_subscribed;
 local cache = require "util.cache";
 local set = require "util.set";
+local new_id = require "util.id".medium;
 
 local xmlns_pubsub = "http://jabber.org/protocol/pubsub";
 local xmlns_pubsub_event = "http://jabber.org/protocol/pubsub#event";
@@ -147,7 +148,8 @@
 			end
 		end
 
-		local message = st.message({ from = user_bare, type = "headline" })
+		local id = new_id();
+		local message = st.message({ from = user_bare, type = "headline", id = id })
 			:tag("event", { xmlns = xmlns_pubsub_event })
 				:tag(kind, { node = node });