Commit 48fcbfa5 authored by Ariel Fuggini's avatar Ariel Fuggini Committed by JC Brand

Finds names by RegExp with `i` param for case insensitive

parent 22bcbfbb
......@@ -192,6 +192,11 @@ describe("The groupchat moderator tool", function () {
filter.value = 'gower';
u.triggerEvent(filter, "keyup", "KeyboardEvent");
await u.waitUntil(() => ( modal.el.querySelectorAll('.list-group--users > li').length === 1));
filter.value = 'RoMeO';
u.triggerEvent(filter, "keyup", "KeyboardEvent");
await u.waitUntil(() => ( modal.el.querySelectorAll('.list-group--users > li').length === 1));
done();
}));
......
......@@ -214,7 +214,7 @@ export default (o) => {
${ (o.users_with_affiliation instanceof Error) ?
html`<li class="list-group-item">${o.users_with_affiliation.message}</li>` :
(o.users_with_affiliation || []).map(item => ((item.nick || item.jid).match(o.affiliations_filter) ? affiliation_list_item(Object.assign({item}, o)) : '')) }
(o.users_with_affiliation || []).map(item => ((item.nick || item.jid).match(new RegExp(o.affiliations_filter, 'i')) ? affiliation_list_item(Object.assign({item}, o)) : '')) }
</ul>
</div>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment