Diff

plugins/muc/lock.lib.lua @ 10450:c1edeb9fe337

MUC: Indicate the component as origin of various errors where there's no room A room that doesn't exist can't return an error, can it?
author Kim Alvefur <zash@zash.se>
date Tue, 26 Nov 2019 00:02:13 +0100
parent 8866:2c60ae791bdc
child 12977:74b9e05af71e
line wrap: on
line diff
--- a/plugins/muc/lock.lib.lua	Mon Nov 25 23:52:45 2019 +0100
+++ b/plugins/muc/lock.lib.lua	Tue Nov 26 00:02:13 2019 +0100
@@ -43,7 +43,7 @@
 module:hook("muc-occupant-pre-join", function(event)
 	if not event.is_new_room and is_locked(event.room) then -- Deny entry
 		module:log("debug", "Room is locked, denying entry");
-		event.origin.send(st.error_reply(event.stanza, "cancel", "item-not-found"));
+		event.origin.send(st.error_reply(event.stanza, "cancel", "item-not-found", nil, module.host));
 		return true;
 	end
 end, -30);