mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-20 10:13:17 +00:00
Added support to message-box to specify UID directly
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user