plugins/mod_message.lua
changeset 11819 df1d3df2204a
parent 11801 72a2b85c0537
child 12981 74b9e05af71e
--- a/plugins/mod_message.lua	Wed Sep 22 13:29:47 2021 +0200
+++ b/plugins/mod_message.lua	Wed Sep 22 13:31:13 2021 +0100
@@ -22,6 +22,15 @@
 	if t == "error" then
 		return true; -- discard
 	elseif t == "groupchat" then
+		local node, host = jid_split(bare);
+		if user_exists(node, host) then
+			if module:fire_event("message/bare/groupchat", {
+				origin = origin, stanza = stanza;
+			}) then
+				return true;
+			end
+		end
+
 		origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
 	elseif t == "headline" then
 		if user and stanza.attr.to == bare then