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)
|
window.matrixWidget.setAlwaysOnScreen(true)
|
||||||
|
|
||||||
// Register all channels, recursively
|
// Register all channels, recursively
|
||||||
const registerChannel = channel => {
|
const registerChannel = (channel, channelPath) => {
|
||||||
this._newChannel(channel)
|
this._newChannel(channel)
|
||||||
// join channel
|
if(channelPath === channelName) {
|
||||||
if (channel.name === channelName) {
|
|
||||||
client.self.setChannel(channel)
|
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
|
// Register all users
|
||||||
client.users.forEach(user => this._newUser(user))
|
client.users.forEach(user => this._newUser(user))
|
||||||
|
|
Loading…
Reference in a new issue