Software /
code /
prosody
Comparison
plugins/mod_admin_shell.lua @ 12871:885323e2a1ce
mod_admin_shell: Match substring in muc:affiliations() like muc:occupants()
Maybe one day we'll get consistent filtering semantics everywhere.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 30 Jan 2023 00:14:50 +0100 |
parent | 12870:56397f3b58c1 |
child | 12888:b8504b71735d |
comparison
equal
deleted
inserted
replaced
12870:56397f3b58c1 | 12871:885323e2a1ce |
---|---|
1458 end | 1458 end |
1459 | 1459 |
1460 local total = #affiliated; | 1460 local total = #affiliated; |
1461 if filter then | 1461 if filter then |
1462 affiliated:filter(function(affiliation) | 1462 affiliated:filter(function(affiliation) |
1463 return filter == affiliation[1] or filter == affiliation[2]; | 1463 return filter == affiliation[1] or affiliation[2]:find(filter, 1, true); |
1464 end); | 1464 end); |
1465 end | 1465 end |
1466 local displayed = #affiliated; | 1466 local displayed = #affiliated; |
1467 local aff_ranking = muc_util.valid_affiliations; | 1467 local aff_ranking = muc_util.valid_affiliations; |
1468 affiliated:sort(function(a, b) | 1468 affiliated:sort(function(a, b) |