Comparison

plugins/muc/mod_muc.lua @ 9018:73320e33762d

MUC: Send an 'gone' error instead of unavailable + <destroyed> List discussion here: https://mail.jabber.org/pipermail/standards/2018-July/035228.html
author Kim Alvefur <zash@zash.se>
date Wed, 11 Jul 2018 11:50:44 +0200
parent 9016:946ae1181c57
child 9019:d780c10709c1
comparison
equal deleted inserted replaced
9017:1184f5762592 9018:73320e33762d
401 if is_admin(stanza.attr.from) or room._data.locked < os.time() then 401 if is_admin(stanza.attr.from) or room._data.locked < os.time() then
402 -- Allow the room to be recreated by admin or after time has passed 402 -- Allow the room to be recreated by admin or after time has passed
403 delete_room(room); 403 delete_room(room);
404 room = nil; 404 room = nil;
405 else 405 else
406 local reply = st.reply(stanza) 406 local reply = st.error_reply(stanza, "cancel", "gone", room._data.reason)
407 :tag("x", {xmlns = "http://jabber.org/protocol/muc#user"})
408 :tag("item", { affiliation='none', role='none' }):up()
409 :tag("destroy", {jid=room._data.newjid}):text(room._data.reason);
410 reply.attr.type = "unavailable";
411 event.origin.send(reply); 407 event.origin.send(reply);
412 return true; 408 return true;
413 end 409 end
414 end 410 end
415 end 411 end