mod_restrict_xmpp: Treat archive query as a read despite using iq-set
XEP-0313 uses iq-set to initiate a query, but unlike many other uses of
iq-set, this does not mutate anything on the server, so it should not be
treated as a write request.
local st = require"util.stanza";
local datetime = require"util.datetime";
local presence = st.presence({ from = module.host })
:tag("delay", { xmlns = "urn:xmpp:delay",
stamp = datetime.datetime(prosody.start_time) });
module:hook("presence/host", function(event)
local stanza = event.stanza;
if stanza.attr.type == "probe" then
presence.attr.id = stanza.attr.id;
presence.attr.to = stanza.attr.from;
module:send(presence);
return true;
end
end, 10);