Browse Source

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

encrypt 4 years ago
parent
commit
a3312ec8ff
1 changed files with 4 additions and 0 deletions
  1. 4 0
      app/index.js

+ 4 - 0
app/index.js

@@ -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)