fix: matching on channel is done on full channel path not just channel name
This commit is contained in:
parent
ac6e230c26
commit
c831b13716
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue