Built motion from commit 753c950e.|2.5.42
[motion2.git] / server / api / screenRecording / screenRecording.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 _0x2fc8=['request','then','info','ScreenRecording,\x20%s,\x20%s','request\x20sent','ScreenRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0x26af67,_0x16e0a1){var _0x30fb7b=function(_0x5c22ac){while(--_0x5c22ac){_0x26af67['push'](_0x26af67['shift']());}};_0x30fb7b(++_0x16e0a1);}(_0x2fc8,0xb3));var _0x82fc=function(_0x1e7b16,_0x4607a1){_0x1e7b16=_0x1e7b16-0x0;var _0x37fadc=_0x2fc8[_0x1e7b16];return _0x37fadc;};'use strict';var _=require(_0x82fc('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x82fc('0x1'));var rs=require(_0x82fc('0x2'));var fs=require('fs');var Redis=require(_0x82fc('0x3'));var db=require(_0x82fc('0x4'))['db'];var utils=require(_0x82fc('0x5'));var logger=require(_0x82fc('0x6'))('rpc');var config=require(_0x82fc('0x7'));var jayson=require(_0x82fc('0x8'));var client=jayson[_0x82fc('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x46d491,_0x14ea3f,_0x305770){return new BPromise(function(_0x17e547,_0x1105a3){return client[_0x82fc('0xa')](_0x46d491,_0x305770)[_0x82fc('0xb')](function(_0x2c5712){logger[_0x82fc('0xc')](_0x82fc('0xd'),_0x14ea3f,_0x82fc('0xe'));logger['debug'](_0x82fc('0xf'),_0x14ea3f,_0x82fc('0xe'),JSON[_0x82fc('0x10')](_0x2c5712));if(_0x2c5712[_0x82fc('0x11')]){if(_0x2c5712[_0x82fc('0x11')][_0x82fc('0x12')]===0x1f4){logger[_0x82fc('0x11')](_0x82fc('0xd'),_0x14ea3f,_0x2c5712[_0x82fc('0x11')][_0x82fc('0x13')]);return _0x1105a3(_0x2c5712[_0x82fc('0x11')][_0x82fc('0x13')]);}logger[_0x82fc('0x11')](_0x82fc('0xd'),_0x14ea3f,_0x2c5712['error']['message']);return _0x17e547(_0x2c5712[_0x82fc('0x11')]['message']);}else{logger[_0x82fc('0xc')](_0x82fc('0xd'),_0x14ea3f,_0x82fc('0xe'));_0x17e547(_0x2c5712['result'][_0x82fc('0x13')]);}})[_0x82fc('0x14')](function(_0xfbc560){logger[_0x82fc('0x11')](_0x82fc('0xd'),_0x14ea3f,_0xfbc560);_0x1105a3(_0xfbc560);});});}