mod_admin_shell: Match substring in muc:affiliations() like muc:occupants()

Maybe one day we'll get consistent filtering semantics everywhere.
This commit is contained in:
Kim Alvefur 2023-01-30 00:14:50 +01:00
parent 1b71a53fb7
commit dc958f1e40

View file

@ -1460,7 +1460,7 @@ function def_env.muc:affiliations(room_jid, filter)
local total = #affiliated;
if filter then
affiliated:filter(function(affiliation)
return filter == affiliation[1] or filter == affiliation[2];
return filter == affiliation[1] or affiliation[2]:find(filter, 1, true);
end);
end
local displayed = #affiliated;