new chans in config, & allow SUB by template for [UID], and added cnxId & [CUID]

This commit is contained in:
STEINNI
2026-06-26 16:19:17 +00:00
parent 1db846daa3
commit b82026fe85
2 changed files with 5 additions and 3 deletions
+2
View File
@@ -20,6 +20,7 @@ export const methods = {
let subscribed = [] let subscribed = []
for(var chan of payload){ for(var chan of payload){
if((!chan) || (typeof(chan)!='string')) continue if((!chan) || (typeof(chan)!='string')) continue
chan = chan.replace(/\[UID\]/g, this.userId)
if(!this.accessRights.canSubscribe(this.userId, this.roles, chan)) { if(!this.accessRights.canSubscribe(this.userId, this.roles, chan)) {
if(this.debug) console.log('SUB: No rights to this chan!', this.userId, this.roles, chan) if(this.debug) console.log('SUB: No rights to this chan!', this.userId, this.roles, chan)
continue continue
@@ -72,6 +73,7 @@ export const methods = {
let unSubscribed = [] let unSubscribed = []
for(var chan of payload){ for(var chan of payload){
if((!chan) || (typeof(chan)!='string')) continue if((!chan) || (typeof(chan)!='string')) continue
chan = chan.replace(/\[UID\]/g, this.userId)
if(this.accessRights.isMandatory(this.userId, this.roles, chan)) continue if(this.accessRights.isMandatory(this.userId, this.roles, chan)) continue
let couldUnsubscribe = false let couldUnsubscribe = false