Fix hasRoleInChannel

This commit is contained in:
Pavel Djundik 2019-01-22 16:33:20 +02:00
parent 32f17d50b4
commit 199df6b729
2 changed files with 1 additions and 5 deletions

View file

@ -1566,10 +1566,6 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
#chat .names-filtered {
display: none;
}
#chat .names .user { #chat .names .user {
display: block; display: block;
line-height: 1.6; line-height: 1.6;

View file

@ -37,7 +37,7 @@ function hasRoleInChannel(channel, roles, nick) {
const channelID = channel.attr("data-id"); const channelID = channel.attr("data-id");
const network = $("#sidebar .network").has(`.chan[data-id="${channelID}"]`); const network = $("#sidebar .network").has(`.chan[data-id="${channelID}"]`);
const target = nick || network.attr("data-nick"); const target = nick || network.attr("data-nick");
const user = channel.find(`.names-original .user[data-name="${escape(target)}"]`).first(); const user = channel.find(`.names .user[data-name="${escape(target)}"]`).first();
return user.parent().is("." + roles.join(", .")); return user.parent().is("." + roles.join(", ."));
} }