Changeset

4999:d5a3c5c1873c

mod_muc: Fix a couple of cases of 'forbidden' stanza error being sent with type 'cancel' - fixes #303
author Matthew Wild <mwild1@gmail.com>
date Tue, 24 Jul 2012 10:44:37 +0100 (2012-07-24)
parents 4998:f6c1f98419be
children 5000:58c9519dc461
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Mon Jul 23 23:05:32 2012 +0200
+++ b/plugins/muc/muc.lib.lua	Tue Jul 24 10:44:37 2012 +0100
@@ -856,7 +856,7 @@
 		if not occupant then -- not in room
 			origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
 		elseif occupant.role == "visitor" then
-			origin.send(st.error_reply(stanza, "cancel", "forbidden"));
+			origin.send(st.error_reply(stanza, "auth", "forbidden"));
 		else
 			local from = stanza.attr.from;
 			stanza.attr.from = current_nick;
@@ -867,7 +867,7 @@
 					self:set_subject(current_nick, subject); -- TODO use broadcast_message_stanza
 				else
 					stanza.attr.from = from;
-					origin.send(st.error_reply(stanza, "cancel", "forbidden"));
+					origin.send(st.error_reply(stanza, "auth", "forbidden"));
 				end
 			else
 				self:broadcast_message(stanza, self:get_historylength() > 0);