Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / services / email / client.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xec6c=['routing','client','http','Request','request','then','debug','rpc','error','message','result','catch','jayson/promise','bluebird','../../config/logger'];(function(_0x48cb1f,_0x5ca68d){var _0x172c4d=function(_0x85040){while(--_0x85040){_0x48cb1f['push'](_0x48cb1f['shift']());}};_0x172c4d(++_0x5ca68d);}(_0xec6c,0x1bf));var _0xcec6=function(_0x3d393f,_0x523ddc){_0x3d393f=_0x3d393f-0x0;var _0xd5cc33=_0xec6c[_0x3d393f];return _0xd5cc33;};'use strict';var jayson=require(_0xcec6('0x0'));var BPromise=require(_0xcec6('0x1'));var logger=require(_0xcec6('0x2'))(_0xcec6('0x3'));var client=jayson[_0xcec6('0x4')][_0xcec6('0x5')]({'port':0x2329});client[_0xcec6('0x6')]=function(_0x4c0951,_0x3a79af){return new BPromise(function(_0x2e62c9,_0x5ca210){return client[_0xcec6('0x7')](_0x4c0951,_0x3a79af)[_0xcec6('0x8')](function(_0x44705e){logger[_0xcec6('0x9')]('rpc','routing',_0x4c0951,_0x3a79af,_0x44705e);if(_0x44705e['error']){logger['error'](_0xcec6('0xa'),_0xcec6('0x3'),_0x4c0951,_0x44705e[_0xcec6('0xb')][_0xcec6('0xc')],_0x3a79af);return _0x5ca210(_0x44705e[_0xcec6('0xb')]['message']);}else{return _0x2e62c9(_0x44705e[_0xcec6('0xd')]);}})[_0xcec6('0xe')](function(_0x100d55){logger[_0xcec6('0xb')](_0xcec6('0xa'),_0xcec6('0x3'),_0x4c0951,_0x100d55,_0x3a79af);return _0x5ca210(_0x100d55);});});};module['exports']=client;