From c831b1371692c0801680923c1aeb846eef5168ee Mon Sep 17 00:00:00 2001 From: encrypt Date: Sun, 15 Mar 2020 22:30:02 +0100 Subject: [PATCH] fix: matching on channel is done on full channel path not just channel name --- app/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/index.js b/app/index.js index dd2e771..754e661 100644 --- a/app/index.js +++ b/app/index.js @@ -362,15 +362,14 @@ class GlobalBindings { window.matrixWidget.setAlwaysOnScreen(true) // Register all channels, recursively - const registerChannel = channel => { + const registerChannel = (channel, channelPath) => { this._newChannel(channel) - // join channel - if (channel.name === channelName) { + if(channelPath === channelName) { client.self.setChannel(channel) } - channel.children.forEach(registerChannel) + channel.children.forEach(ch => registerChannel(ch, channelPath+"/"+ch.name)) } - registerChannel(client.root) + registerChannel(client.root, "") // Register all users client.users.forEach(user => this._newUser(user))