1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-20 02:03:15 +00:00

Added support to message-box to specify UID directly

This commit is contained in:
Bryan Roe
2020-05-17 01:45:13 -07:00
parent 2277b99bd7
commit 1d5aa076db
2 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@@ -47,7 +47,7 @@ var promise = require('promise');
function messageBox() function messageBox()
{ {
this._ObjectID = 'message-box'; this._ObjectID = 'message-box';
this.create = function create(title, caption, timeout, layout) this.create = function create(title, caption, timeout, layout, sid)
{ {
var ret = new promise(function (res, rej) { this._res = res; this._rej = rej; }); var ret = new promise(function (res, rej) { this._res = res; this._rej = rej; });
ret.options = { launch: { module: 'message-box', method: 'slave', args: [] } }; ret.options = { launch: { module: 'message-box', method: 'slave', args: [] } };
@@ -61,7 +61,7 @@ function messageBox()
try try
{ {
ret.options.uid = require('user-sessions').consoleUid(); ret.options.uid = sid == null ? require('user-sessions').consoleUid() : sid;
if (ret.options.uid == require('user-sessions').getProcessOwnerName(process.pid).tsid) { delete ret.options.uid; } if (ret.options.uid == require('user-sessions').getProcessOwnerName(process.pid).tsid) { delete ret.options.uid; }
} }
catch (ee) catch (ee)