Also check endpoint in channel equality checks

This commit is contained in:
Midgard 2022-06-08 21:12:45 +02:00
parent 89fd513be0
commit 283aa5513c
Signed by: midgard
GPG key ID: 511C112F1331BBB4
2 changed files with 2 additions and 1 deletions

View file

@ -119,7 +119,7 @@ function channelNameElements(team, channel) {
function switchToChannel(client, team, channel) {
for (let el of byId("channel_list").childNodes) {
if (el.dataset["id"] == channel.id) {
if (el.dataset["endpoint"] == client.endpoint && el.dataset["id"] == channel.id) {
el.className = "active";
} else {
el.className = "";

View file

@ -39,6 +39,7 @@ function populateChannelList() {
li.appendChild(a);
li.dataset["id"] = channel.id;
li.dataset["endpoint"] = client.endpoint;
nodes.push(li);
}
byId("channel_list").append(...nodes);