diff mod_restrict_xmpp/mod_restrict_xmpp.lua @ 5010:a1f49586d28a

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.
author Kim Alvefur <zash@zash.se>
date Mon, 22 Aug 2022 23:51:07 +0200
parents 459a4001c1d9
children 825c6fb76c48
line wrap: on
line diff
--- a/mod_restrict_xmpp/mod_restrict_xmpp.lua	Mon Aug 22 20:03:23 2022 +0100
+++ b/mod_restrict_xmpp/mod_restrict_xmpp.lua	Mon Aug 22 23:51:07 2022 +0200
@@ -80,6 +80,8 @@
 	elseif proto == "carbons" then
 		-- This allows access to live messages
 		proto, action = "messages", "read";
+	elseif proto == "history" then
+		action = "read";
 	end
 	local permission_name = "xmpp:account:"..(proto and (proto..":") or "")..action;
 	if not module:may(permission_name, event) then