Changeset

9019:d780c10709c1

MUC: Include redirect in 'gone' error for destroyed rooms
author Kim Alvefur <zash@zash.se>
date Wed, 11 Jul 2018 12:05:06 +0200
parents 9018:73320e33762d
children 9020:19e51d8f8947
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Wed Jul 11 11:50:44 2018 +0200
+++ b/plugins/muc/mod_muc.lua	Wed Jul 11 12:05:06 2018 +0200
@@ -404,6 +404,10 @@
 					room = nil;
 				else
 					local reply = st.error_reply(stanza, "cancel", "gone", room._data.reason)
+					if room._data.newjid then
+						local uri = "xmpp:"..room._data.newjid.."?join";
+						reply:get_child("error"):child_with_name("gone"):text(uri);
+					end
 					event.origin.send(reply);
 					return true;
 				end