Allow setting custom username for shared servers, with default as username of server being shared. #6229

This commit is contained in:
Aditya Toshniwal
2023-10-11 12:56:06 +05:30
committed by GitHub
parent 4450145d31
commit fc411bfc49
9 changed files with 90 additions and 36 deletions

View File

@@ -59,7 +59,8 @@ export default class DepListener {
if(actionObj.listener?.callback) {
state = this._getListenerData(state, actionObj.listener, actionObj);
} else {
let allListeners = _.filter(this._depListeners, (entry)=>_.join(currPath, '|').startsWith(_.join(entry.source, '|')));
// adding a extra item in path to avoid incorrect matching like shared and shared_username
let allListeners = _.filter(this._depListeners, (entry)=>_.join(currPath.concat(['']), '|').startsWith(_.join(entry.source.concat(['']), '|')));
if(allListeners) {
for(const listener of allListeners) {
state = this._getListenerData(state, listener, actionObj);