Jitsi Meet: Problems while cleanly destroying a room using a custom prosody module

Hi,

I have created a prosody module to shutdown my room on an API call, I have modified the mod_muc_size a little bit in my setup to achieve this. Here is what i have done

[‘GET shutdown-room’] = function(event)
return wrap_async_run(event, shutdown_room)
end

In the function, I get the room and call

room:clear();
room:destroy();

This clears my prosody session, and the participants are disconnected. But this does not clear the JVB
connection, and the participants are not redirected to the home screen. I saw a fix for this where someone fixed it by modifying jitsi meet source code and building from that source. This is not feasible for me as i am running a docker setup. Is there any way, i can cleanly terminate the room?

There is no such code in jitsi-meet, sorry. There is handling of kick, if you are kicked out of the meeting showing you a message for that.
We have some handling about CONFERENCE_DESTROYED so you should be seeing a message that a conference is destroyed.
But there is nothing currently about going back to welcome page.

Oh, ok. Is there any event in the UI i can listen to when the focus leaves? I am thinking, i will make my UI service call my shutdown_room route after a specified time and when the focus leaves, i will redirect everyone to the home page from my UI.