Built motion from commit 85328c08.|2.5.50
[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 _0x9769=['catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','ScreenRecording,\x20%s,\x20%s','debug','ScreenRecording,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result'];(function(_0x1bc750,_0x23f442){var _0xcd51da=function(_0x323854){while(--_0x323854){_0x1bc750['push'](_0x1bc750['shift']());}};_0xcd51da(++_0x23f442);}(_0x9769,0x178));var _0x9976=function(_0x329823,_0x3a7e22){_0x329823=_0x329823-0x0;var _0x592d5a=_0x9769[_0x329823];return _0x592d5a;};'use strict';var _=require(_0x9976('0x0'));var util=require(_0x9976('0x1'));var moment=require(_0x9976('0x2'));var BPromise=require(_0x9976('0x3'));var rs=require(_0x9976('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x9976('0x5'));var logger=require(_0x9976('0x6'))(_0x9976('0x7'));var config=require(_0x9976('0x8'));var jayson=require(_0x9976('0x9'));var client=jayson[_0x9976('0xa')][_0x9976('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x401833,_0x599dcf,_0x10b12e){return new BPromise(function(_0x1b4606,_0x2cc536){return client[_0x9976('0xc')](_0x401833,_0x10b12e)[_0x9976('0xd')](function(_0x49d4b4){logger['info'](_0x9976('0xe'),_0x599dcf,'request\x20sent');logger[_0x9976('0xf')](_0x9976('0x10'),_0x599dcf,_0x9976('0x11'),JSON[_0x9976('0x12')](_0x49d4b4));if(_0x49d4b4[_0x9976('0x13')]){if(_0x49d4b4[_0x9976('0x13')][_0x9976('0x14')]===0x1f4){logger['error'](_0x9976('0xe'),_0x599dcf,_0x49d4b4[_0x9976('0x13')]['message']);return _0x2cc536(_0x49d4b4[_0x9976('0x13')][_0x9976('0x15')]);}logger[_0x9976('0x13')](_0x9976('0xe'),_0x599dcf,_0x49d4b4[_0x9976('0x13')]['message']);return _0x1b4606(_0x49d4b4[_0x9976('0x13')][_0x9976('0x15')]);}else{logger[_0x9976('0x16')](_0x9976('0xe'),_0x599dcf,_0x9976('0x11'));_0x1b4606(_0x49d4b4[_0x9976('0x17')]['message']);}})[_0x9976('0x18')](function(_0x25b34c){logger[_0x9976('0x13')]('ScreenRecording,\x20%s,\x20%s',_0x599dcf,_0x25b34c);_0x2cc536(_0x25b34c);});});}