aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_message.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/mod_message.lua b/plugins/mod_message.lua
index 09aefc08..9c07e796 100644
--- a/plugins/mod_message.lua
+++ b/plugins/mod_message.lua
@@ -22,6 +22,15 @@ local function process_to_bare(bare, origin, stanza)
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