Built motion from commit da617fac.|2.6.6
[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 _0x8216=['request','then','debug','error','rpc','routing','message','result','catch','exports','jayson/promise','bluebird','client','http','Request'];(function(_0x419a11,_0x248644){var _0x4d2146=function(_0x1f0a8e){while(--_0x1f0a8e){_0x419a11['push'](_0x419a11['shift']());}};_0x4d2146(++_0x248644);}(_0x8216,0x118));var _0x6821=function(_0x13abba,_0x19fc98){_0x13abba=_0x13abba-0x0;var _0x8428b6=_0x8216[_0x13abba];return _0x8428b6;};'use strict';var jayson=require(_0x6821('0x0'));var BPromise=require(_0x6821('0x1'));var logger=require('../../config/logger')('routing');var client=jayson[_0x6821('0x2')][_0x6821('0x3')]({'port':0x2329});client[_0x6821('0x4')]=function(_0x3d58b1,_0x12f490){return new BPromise(function(_0x201e75,_0x280d98){return client[_0x6821('0x5')](_0x3d58b1,_0x12f490)[_0x6821('0x6')](function(_0x11e0b0){logger[_0x6821('0x7')]('rpc','routing',_0x3d58b1,_0x12f490,_0x11e0b0);if(_0x11e0b0[_0x6821('0x8')]){logger[_0x6821('0x8')](_0x6821('0x9'),_0x6821('0xa'),_0x3d58b1,_0x11e0b0[_0x6821('0x8')][_0x6821('0xb')],_0x12f490);return _0x280d98(_0x11e0b0[_0x6821('0x8')][_0x6821('0xb')]);}else{return _0x201e75(_0x11e0b0[_0x6821('0xc')]);}})[_0x6821('0xd')](function(_0x3b6dcc){logger[_0x6821('0x8')](_0x6821('0x9'),'routing',_0x3d58b1,_0x3b6dcc,_0x12f490);return _0x280d98(_0x3b6dcc);});});};module[_0x6821('0xe')]=client;