Skip to content

Commit

Permalink
add recall_id handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfonso committed Jan 2, 2024
1 parent 00f3287 commit 48ef12d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/modules/browser_mod.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ class BrowserModModule {
instance: message.browserID,
ws
};
ws.browserID = message.browserID; //store browserID in ws object to handle recall service call later.

ws.send(JSON.stringify([{id: message.id, type: 'result', success: true, result: null}, {
id: message.id, type: 'event', event: {
Expand Down Expand Up @@ -399,6 +400,8 @@ class BrowserModModule {
this.adapter.log.debug('Updated browser_mod settings: ' + message.key + ' to ' + message.value);
}
//think about making this permanent somehow? -> but only if we find a way to allow browser_mod_settings panel.
} else if (method === 'recall_id') {
ws.send(JSON.stringify({id: message.id, type: 'result', success: true, result: ws.browserID}));
} else {
this.adapter.log.warn('Unknown browser_mod method: ' + JSON.stringify(message));
}
Expand Down

0 comments on commit 48ef12d

Please sign in to comment.