Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / config / utils.js
index 2ca0db7..f8f5e77 100644 (file)
@@ -1 +1 @@
-const a888_0x5e37=['chat','voice','isUndefined','Maximum\x20login\x20has\x20been\x20reached','getLicense','includes','toLowerCase','openchannel','User','agents','sms','fax','lodash','mail','getChannels','agent','then','update','clearBlockUser','./license/util','whatsapp','isValidChannel','role','../mysqldb','count'];(function(_0x417cb7,_0x5e37eb){const _0x3f41ee=function(_0x3507ea){while(--_0x3507ea){_0x417cb7['push'](_0x417cb7['shift']());}};_0x3f41ee(++_0x5e37eb);}(a888_0x5e37,0xb1));const a888_0x3f41=function(_0x417cb7,_0x5e37eb){_0x417cb7=_0x417cb7-0x0;let _0x3f41ee=a888_0x5e37[_0x417cb7];return _0x3f41ee;};const _0x56a916=a888_0x3f41;'use strict';const _=require(_0x56a916('0xa')),db=require(_0x56a916('0x15'))['db'],util=require(_0x56a916('0x11')),{Op}=require('sequelize'),channels=[_0x56a916('0x18'),_0x56a916('0xb'),_0x56a916('0x17'),_0x56a916('0x9'),_0x56a916('0x8'),_0x56a916('0x12'),_0x56a916('0x5')];exports[_0x56a916('0xc')]=function(){return channels;},exports[_0x56a916('0x13')]=function(_0x3507ea){const _0xdd6445=_0x56a916;return _0x3507ea=_0x3507ea[_0xdd6445('0x4')](),_[_0xdd6445('0x3')](channels,_0x3507ea);},exports[_0x56a916('0x10')]=function(_0x596a22,_0x9adb9f,_0x30b373,_0x532152){const _0x4315bf=_0x56a916,_0x15b6dd={'loginAttempts':_0x9adb9f,'blocked':_0x30b373};return!_[_0x4315bf('0x0')](_0x532152)&&(_0x15b6dd['blockedAt']=_0x532152),_0x596a22[_0x4315bf('0xf')](_0x15b6dd);},exports[_0x56a916('0x2')]=function(_0x46dc2f){return new Promise(function(_0x4f5b43,_0x498ec2){const _0x34bf23=a888_0x3f41;let _0x17acfa=0x0;_0x46dc2f[_0x34bf23('0x14')]!=='agent'&&_0x4f5b43(_0x46dc2f),db[_0x34bf23('0x6')][_0x34bf23('0x16')]({'where':{'role':_0x34bf23('0xd'),'online':!![],'id':{[Op['ne']]:_0x46dc2f['id']}}})[_0x34bf23('0xe')](function(_0x42b0fe){return _0x17acfa=_0x42b0fe,util['getLicense']();})[_0x34bf23('0xe')](function(_0x5bb07c){const _0x130737=_0x34bf23;if(_0x5bb07c&&_0x5bb07c[_0x130737('0x7')]&&_0x17acfa>=_0x5bb07c[_0x130737('0x7')])throw Error(_0x130737('0x1'));_0x4f5b43(_0x46dc2f);})['catch'](function(_0x1baef3){_0x498ec2(_0x1baef3);});});};
\ No newline at end of file
+const a887_0x5524=['update','sms','User','voice','role','getChannels','agent','./license/util','then','mail','openchannel','whatsapp','fax','count','blockedAt','Maximum\x20login\x20has\x20been\x20reached','isValidChannel','clearBlockUser','agents','getLicense','includes','../mysqldb'];(function(_0x34d620,_0x5524d7){const _0x12e9d3=function(_0x40c4a6){while(--_0x40c4a6){_0x34d620['push'](_0x34d620['shift']());}};_0x12e9d3(++_0x5524d7);}(a887_0x5524,0xeb));const a887_0x12e9=function(_0x34d620,_0x5524d7){_0x34d620=_0x34d620-0x0;let _0x12e9d3=a887_0x5524[_0x34d620];return _0x12e9d3;};const _0x242ba8=a887_0x12e9;'use strict';const _=require('lodash'),db=require(_0x242ba8('0x6'))['db'],util=require(_0x242ba8('0xe')),{Op}=require('sequelize'),channels=[_0x242ba8('0xa'),_0x242ba8('0x10'),'chat',_0x242ba8('0x13'),_0x242ba8('0x8'),_0x242ba8('0x12'),_0x242ba8('0x11')];exports[_0x242ba8('0xc')]=function(){return channels;},exports[_0x242ba8('0x1')]=function(_0x40c4a6){const _0x4207ba=_0x242ba8;return _0x40c4a6=_0x40c4a6['toLowerCase'](),_[_0x4207ba('0x5')](channels,_0x40c4a6);},exports[_0x242ba8('0x2')]=function(_0x550fb7,_0x425e3a,_0x4ee04f,_0x406960){const _0x1a5e1=_0x242ba8,_0x346b81={'loginAttempts':_0x425e3a,'blocked':_0x4ee04f};return!_['isUndefined'](_0x406960)&&(_0x346b81[_0x1a5e1('0x15')]=_0x406960),_0x550fb7[_0x1a5e1('0x7')](_0x346b81);},exports[_0x242ba8('0x4')]=function(_0x5de688){return new Promise(function(_0x566638,_0x1a8370){const _0x48419=a887_0x12e9;let _0x27e34a=0x0;_0x5de688[_0x48419('0xb')]!==_0x48419('0xd')&&_0x566638(_0x5de688),db[_0x48419('0x9')][_0x48419('0x14')]({'where':{'role':_0x48419('0xd'),'online':!![],'id':{[Op['ne']]:_0x5de688['id']}}})[_0x48419('0xf')](function(_0x14194d){const _0x510bd0=_0x48419;return _0x27e34a=_0x14194d,util[_0x510bd0('0x4')]();})[_0x48419('0xf')](function(_0x34e1c8){const _0x1cf249=_0x48419;if(_0x34e1c8&&_0x34e1c8[_0x1cf249('0x3')]&&_0x27e34a>=_0x34e1c8[_0x1cf249('0x3')])throw Error(_0x1cf249('0x0'));_0x566638(_0x5de688);})['catch'](function(_0x212e6f){_0x1a8370(_0x212e6f);});});};
\ No newline at end of file