mod_admin_shell: Match substring in muc:affiliations() like muc:occupants()
authorKim Alvefur <zash@zash.se>
Mon, 30 Jan 2023 00:14:50 +0100
changeset 12875 885323e2a1ce
parent 12874 56397f3b58c1
child 12876 a20923f7d5fd
mod_admin_shell: Match substring in muc:affiliations() like muc:occupants() Maybe one day we'll get consistent filtering semantics everywhere.
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Sun Jan 29 21:37:13 2023 +0100
+++ b/plugins/mod_admin_shell.lua	Mon Jan 30 00:14:50 2023 +0100
@@ -1460,7 +1460,7 @@
 	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;