append / to the beginning of channelName if it is not present

This commit is contained in:
encrypt 2020-03-26 17:56:21 +01:00
parent f30f6db786
commit a3312ec8ff

View file

@ -382,6 +382,10 @@ class GlobalBindings {
window.matrixWidget.setAlwaysOnScreen(true)
// Register all channels, recursively
if(channelName.indexOf("/") != 0) {
channelName = "/"+channelName;
}
const registerChannel = (channel, channelPath) => {
this._newChannel(channel)
console.log(channelPath)