Mercurial > prosody-modules
diff mod_remote_roster/mod_remote_roster.lua @ 5650:0eb2d5ea2428
merge
| author | Stephen Paul Weber <singpolyma@singpolyma.net> |
|---|---|
| date | Sat, 06 May 2023 19:40:23 -0500 |
| parents | ad6e9b0fd15b |
| children |
line wrap: on
line diff
--- a/mod_remote_roster/mod_remote_roster.lua Wed Feb 22 22:47:45 2023 -0500 +++ b/mod_remote_roster/mod_remote_roster.lua Sat May 06 19:40:23 2023 -0500 @@ -19,6 +19,7 @@ local rm_roster_push = require "core.rostermanager".roster_push; local user_exists = require "core.usermanager".user_exists; local add_task = require "util.timer".add_task; +local new_id = require "util.id".short; module:hook("iq-get/bare/jabber:iq:roster:query", function(event) local origin, stanza = event.origin, event.stanza; @@ -138,7 +139,7 @@ if roster then local item = roster[jid]; local contact_node, contact_host = jid_split(jid); - local stanza = st.iq({ type="set", from=node.."@"..host, to=contact_host }):query("jabber:iq:roster"); + local stanza = st.iq({ type="set", from=node.."@"..host, to=contact_host, id = new_id() }):query("jabber:iq:roster"); if item then stanza:tag("item", { jid = jid, subscription = item.subscription, name = item.name, ask = item.ask }); for group in pairs(item.groups) do
