1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x8e97=['resolve','getMailAccounts','then','initMailAccounts','refresh','mailAccounts','listen','catch','log','bluebird','./server','./realtime','./lib/email','./rpc/mailAccount'];(function(_0x4bfb94,_0x57e844){var _0x55bde6=function(_0x2ea3c1){while(--_0x2ea3c1){_0x4bfb94['push'](_0x4bfb94['shift']());}};_0x55bde6(++_0x57e844);}(_0x8e97,0x6b));var _0x78e9=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x8e97[_0x4565bf];return _0x5610ba;};'use strict';var BPromise=require(_0x78e9('0x0'));var server=require(_0x78e9('0x1'));var Realtime=require(_0x78e9('0x2'));var EmailChannel=require(_0x78e9('0x3'));var mailAccount=require(_0x78e9('0x4'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return BPromise[_0x78e9('0x5')]()['then'](mailAccount[_0x78e9('0x6')]())[_0x78e9('0x7')](realtime[_0x78e9('0x8')]())['then'](function(){email[_0x78e9('0x9')](realtime[_0x78e9('0xa')]);return realtime;});}function main(){return server[_0x78e9('0xb')](realtime,email)[_0x78e9('0x7')](function(_0x5d024f){return initRealtime();})[_0x78e9('0x7')](function(_0x95c714){return setInterval(initRealtime,0x2710);})[_0x78e9('0xc')](function(_0x220a2a){console[_0x78e9('0xd')](_0x220a2a);});}main();