Need help in applying "muc_owner_allow_kick.patch"

I have made everybody a moderator (be default without using a secure domain), now the ‘kick out’ functionality is not working. Could someone please help in how to apply this patch? I tried using the patch command and also tried doing it manually but didn’t work.


goto /usr/lib/prosody/modules/muc

sudo patch -b </usr/share/jitsi-meet/prosody-plugins/muc_owner_allow_kick.patch

you should see something along the lines of

patching file muc.lib.lua
Hunk #1 succeeded at 1390 (offset 134 lines).

then you will get a new file muc.lib.lua and the original file will be saved to muc.lib.lua.orig
if you have already mucked out with patch the previous command can fail.

Yeah the patching failed:

patching file muc.lib.lua
Hunk #1 FAILED at 1256.
1 out of 1 hunk FAILED -- saving rejects to file muc.lib.lua.rej

So if it means it has already been patched? but still kicking out doesn’t work.

no it means that the patch is not compatible with the prosody version you have. It’s either too old or too new, the muc.lib.lua is too different. Yes, that’s the problem: in 0.11.5 the code was changed substantially, and I still use the Ubuntu version for 20.04 LTS (0.11.4) so the patch applies for me but not for you.
If you downgrade Prosody to 0.11.4 you will be able to apply the patch.