Built motion from commit 616d3211.|2.6.4
[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 _0x8d43=['catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','ScreenRecording,\x20%s,\x20%s','request\x20sent','debug','ScreenRecording,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x25b5f3,_0xcfe85d){var _0x54cb05=function(_0x4b0740){while(--_0x4b0740){_0x25b5f3['push'](_0x25b5f3['shift']());}};_0x54cb05(++_0xcfe85d);}(_0x8d43,0x1b6));var _0x38d4=function(_0x120741,_0x1c73c6){_0x120741=_0x120741-0x0;var _0x25bbc9=_0x8d43[_0x120741];return _0x25bbc9;};'use strict';var _=require('lodash');var util=require(_0x38d4('0x0'));var moment=require(_0x38d4('0x1'));var BPromise=require(_0x38d4('0x2'));var rs=require(_0x38d4('0x3'));var fs=require('fs');var Redis=require(_0x38d4('0x4'));var db=require(_0x38d4('0x5'))['db'];var utils=require(_0x38d4('0x6'));var logger=require(_0x38d4('0x7'))(_0x38d4('0x8'));var config=require(_0x38d4('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x38d4('0xa')][_0x38d4('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2d4ad5,_0x5e10fd,_0x41115e){return new BPromise(function(_0x3bc461,_0x563c48){return client[_0x38d4('0xc')](_0x2d4ad5,_0x41115e)[_0x38d4('0xd')](function(_0x1567df){logger[_0x38d4('0xe')](_0x38d4('0xf'),_0x5e10fd,_0x38d4('0x10'));logger[_0x38d4('0x11')](_0x38d4('0x12'),_0x5e10fd,_0x38d4('0x10'),JSON['stringify'](_0x1567df));if(_0x1567df['error']){if(_0x1567df[_0x38d4('0x13')][_0x38d4('0x14')]===0x1f4){logger[_0x38d4('0x13')](_0x38d4('0xf'),_0x5e10fd,_0x1567df[_0x38d4('0x13')][_0x38d4('0x15')]);return _0x563c48(_0x1567df[_0x38d4('0x13')]['message']);}logger[_0x38d4('0x13')](_0x38d4('0xf'),_0x5e10fd,_0x1567df['error'][_0x38d4('0x15')]);return _0x3bc461(_0x1567df['error'][_0x38d4('0x15')]);}else{logger['info'](_0x38d4('0xf'),_0x5e10fd,_0x38d4('0x10'));_0x3bc461(_0x1567df['result'][_0x38d4('0x15')]);}})[_0x38d4('0x16')](function(_0x3983be){logger[_0x38d4('0x13')](_0x38d4('0xf'),_0x5e10fd,_0x3983be);_0x563c48(_0x3983be);});});}