Built motion from commit 3d3e98f2.|2.6.29
[motion2.git] / server / api / chatProactiveAction / chatProactiveAction.rpc.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 _0x60ab=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x111452,_0x2aae91){var _0x3a9588=function(_0x2ac7e3){while(--_0x2ac7e3){_0x111452['push'](_0x111452['shift']());}};_0x3a9588(++_0x2aae91);}(_0x60ab,0x72));var _0xb60a=function(_0x35b18a,_0x6b2fbe){_0x35b18a=_0x35b18a-0x0;var _0x4db1bd=_0x60ab[_0x35b18a];return _0x4db1bd;};'use strict';var _=require('lodash');var util=require(_0xb60a('0x0'));var moment=require(_0xb60a('0x1'));var BPromise=require(_0xb60a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb60a('0x3'));var db=require(_0xb60a('0x4'))['db'];var utils=require(_0xb60a('0x5'));var logger=require(_0xb60a('0x6'))(_0xb60a('0x7'));var config=require(_0xb60a('0x8'));var jayson=require(_0xb60a('0x9'));var client=jayson[_0xb60a('0xa')][_0xb60a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x56c70f,_0x5ec31b,_0x5877f4){return new BPromise(function(_0x25bdea,_0xe4327a){return client[_0xb60a('0xc')](_0x56c70f,_0x5877f4)[_0xb60a('0xd')](function(_0x420193){logger[_0xb60a('0xe')](_0xb60a('0xf'),_0x5ec31b,_0xb60a('0x10'));logger[_0xb60a('0x11')](_0xb60a('0x12'),_0x5ec31b,_0xb60a('0x10'),JSON['stringify'](_0x420193));if(_0x420193[_0xb60a('0x13')]){if(_0x420193[_0xb60a('0x13')][_0xb60a('0x14')]===0x1f4){logger[_0xb60a('0x13')](_0xb60a('0xf'),_0x5ec31b,_0x420193[_0xb60a('0x13')][_0xb60a('0x15')]);return _0xe4327a(_0x420193[_0xb60a('0x13')][_0xb60a('0x15')]);}logger['error'](_0xb60a('0xf'),_0x5ec31b,_0x420193[_0xb60a('0x13')][_0xb60a('0x15')]);return _0x25bdea(_0x420193[_0xb60a('0x13')][_0xb60a('0x15')]);}else{logger[_0xb60a('0xe')](_0xb60a('0xf'),_0x5ec31b,_0xb60a('0x10'));_0x25bdea(_0x420193[_0xb60a('0x16')][_0xb60a('0x15')]);}})[_0xb60a('0x17')](function(_0x22f723){logger[_0xb60a('0x13')](_0xb60a('0xf'),_0x5ec31b,_0x22f723);_0xe4327a(_0x22f723);});});}