Built motion from commit a679711e.|2.6.15
[motion2.git] / server / api / chatOfflineMessage / chatOfflineMessage.rpc.js
index 3c5718e..45956dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5b0e=['ChatOfflineMessage,\x20%s,\x20%s','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','catch','util','bluebird','randomstring','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','then'];(function(_0x5e74a5,_0x150257){var _0x2b1172=function(_0xe202a2){while(--_0xe202a2){_0x5e74a5['push'](_0x5e74a5['shift']());}};_0x2b1172(++_0x150257);}(_0x5b0e,0x8e));var _0xe5b0=function(_0x5ac84c,_0x287781){_0x5ac84c=_0x5ac84c-0x0;var _0x3c53d2=_0x5b0e[_0x5ac84c];return _0x3c53d2;};'use strict';var _=require('lodash');var util=require(_0xe5b0('0x0'));var moment=require('moment');var BPromise=require(_0xe5b0('0x1'));var rs=require(_0xe5b0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xe5b0('0x3'));var logger=require(_0xe5b0('0x4'))(_0xe5b0('0x5'));var config=require('../../config/environment');var jayson=require(_0xe5b0('0x6'));var client=jayson['client'][_0xe5b0('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x490a99,_0x55f7ec,_0x3ac72c){return new BPromise(function(_0x3429b4,_0x2e353b){return client[_0xe5b0('0x8')](_0x490a99,_0x3ac72c)[_0xe5b0('0x9')](function(_0x4ef294){logger['info'](_0xe5b0('0xa'),_0x55f7ec,'request\x20sent');logger['debug'](_0xe5b0('0xb'),_0x55f7ec,_0xe5b0('0xc'),JSON[_0xe5b0('0xd')](_0x4ef294));if(_0x4ef294[_0xe5b0('0xe')]){if(_0x4ef294[_0xe5b0('0xe')]['code']===0x1f4){logger['error']('ChatOfflineMessage,\x20%s,\x20%s',_0x55f7ec,_0x4ef294[_0xe5b0('0xe')][_0xe5b0('0xf')]);return _0x2e353b(_0x4ef294[_0xe5b0('0xe')][_0xe5b0('0xf')]);}logger[_0xe5b0('0xe')](_0xe5b0('0xa'),_0x55f7ec,_0x4ef294[_0xe5b0('0xe')][_0xe5b0('0xf')]);return _0x3429b4(_0x4ef294[_0xe5b0('0xe')]['message']);}else{logger[_0xe5b0('0x10')](_0xe5b0('0xa'),_0x55f7ec,_0xe5b0('0xc'));_0x3429b4(_0x4ef294[_0xe5b0('0x11')]['message']);}})[_0xe5b0('0x12')](function(_0x288355){logger['error'](_0xe5b0('0xa'),_0x55f7ec,_0x288355);_0x2e353b(_0x288355);});});}
\ No newline at end of file
+var _0xff16=['request','then','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client'];(function(_0x2abd13,_0x501317){var _0x5ad645=function(_0x55ae11){while(--_0x55ae11){_0x2abd13['push'](_0x2abd13['shift']());}};_0x5ad645(++_0x501317);}(_0xff16,0x7f));var _0x6ff1=function(_0x372e47,_0x253f7e){_0x372e47=_0x372e47-0x0;var _0x5ea356=_0xff16[_0x372e47];return _0x5ea356;};'use strict';var _=require(_0x6ff1('0x0'));var util=require(_0x6ff1('0x1'));var moment=require('moment');var BPromise=require(_0x6ff1('0x2'));var rs=require(_0x6ff1('0x3'));var fs=require('fs');var Redis=require(_0x6ff1('0x4'));var db=require(_0x6ff1('0x5'))['db'];var utils=require(_0x6ff1('0x6'));var logger=require(_0x6ff1('0x7'))(_0x6ff1('0x8'));var config=require(_0x6ff1('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x6ff1('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x133524,_0x649806,_0x2333b1){return new BPromise(function(_0xbea21f,_0x1fb27c){return client[_0x6ff1('0xb')](_0x133524,_0x2333b1)[_0x6ff1('0xc')](function(_0x172393){logger['info'](_0x6ff1('0xd'),_0x649806,_0x6ff1('0xe'));logger[_0x6ff1('0xf')](_0x6ff1('0x10'),_0x649806,_0x6ff1('0xe'),JSON[_0x6ff1('0x11')](_0x172393));if(_0x172393[_0x6ff1('0x12')]){if(_0x172393[_0x6ff1('0x12')][_0x6ff1('0x13')]===0x1f4){logger[_0x6ff1('0x12')]('ChatOfflineMessage,\x20%s,\x20%s',_0x649806,_0x172393['error'][_0x6ff1('0x14')]);return _0x1fb27c(_0x172393['error'][_0x6ff1('0x14')]);}logger[_0x6ff1('0x12')](_0x6ff1('0xd'),_0x649806,_0x172393['error']['message']);return _0xbea21f(_0x172393['error'][_0x6ff1('0x14')]);}else{logger[_0x6ff1('0x15')](_0x6ff1('0xd'),_0x649806,_0x6ff1('0xe'));_0xbea21f(_0x172393[_0x6ff1('0x16')][_0x6ff1('0x14')]);}})['catch'](function(_0x155d26){logger[_0x6ff1('0x12')](_0x6ff1('0xd'),_0x649806,_0x155d26);_0x1fb27c(_0x155d26);});});}
\ No newline at end of file