Not long ago I experienced a bug, where I created a room, containing Danish characters, named “møde” (Danish for “meeting”), after which I noticed that I could not add any breakout rooms to the meeting. A quick look in the prosody.log revealed the message:
...:muc_breakout_rooms warn No room found found for /m%25c3%25b8de
I then checked the jicofo /debug endpoint for active rooms in the focus_manager key, and saw that a room named “m%c3%b8de” was active.
Comparing the two, I recognized that the the room name displayed in the prosody log had been URL encoded twice, encoding ‘%’ → ‘25’. I dug into the lua scripts to find that the mod_muc_breakout_rooms.lua script depends on the jitsi_session module. In the mod_jitsi_session.lua script I see to definitions.
session.jitsi_web_query_room = urlencode(params.room)
session.jitsi_web_query_prefix = urlencode(params.prefix) or "";
Apparently, this is where the “damage” is done. I may be wrong, but it seems that the params.room and params.prefix are already encoded. I wanted to ask the community whether this seems to be the intended flow. If I remove urlencode() around params.room and params.prefix - I can now create breakout rooms in meetings with non-ASCII names. The same is true if i import
local formdecode = require "util.http".formdecode;
in the mod_muc_breakout_rooms.lua script and use the formdecode() function on the session.jitsi_web_query_room_prefix and session.jitsi_web_query_prefix variables.
I can reproduce the double-encoding issue, so effectively reverting a6bc51cff1566a8afb5cb29eb74a72da89fc74e5 will fix it, I can confirm that test result from you, @Nicolas_Semaphor as well
Back then breakout rooms did not work without the encoding, as the room names were previously urldecoded (somewhere) and thus had to be urlencoded again so that the breakout room creation found the main room. So before the commit it was not working, then it worked, then somewhere the urldecoding was removed, so its was no longer working and now after the PR its working again. I have it deployed for testing on jitsi.luki.org, and any room with a non-ascii character will do for testing, like täst or møde