Built motion from commit b5996064.|2.6.21
[motion2.git] / server / api / chatOfflineMessage / chatOfflineMessage.rpc.js
index f002207..3264e17 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8987=['result','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','info','ChatOfflineMessage,\x20%s,\x20%s','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','error','message','request\x20sent'];(function(_0x42754d,_0x33a711){var _0x2190d0=function(_0xd2083){while(--_0xd2083){_0x42754d['push'](_0x42754d['shift']());}};_0x2190d0(++_0x33a711);}(_0x8987,0xc9));var _0x7898=function(_0x1265ed,_0x4b85e8){_0x1265ed=_0x1265ed-0x0;var _0x5ac459=_0x8987[_0x1265ed];return _0x5ac459;};'use strict';var _=require('lodash');var util=require(_0x7898('0x0'));var moment=require(_0x7898('0x1'));var BPromise=require(_0x7898('0x2'));var rs=require(_0x7898('0x3'));var fs=require('fs');var Redis=require(_0x7898('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x7898('0x5'));var logger=require(_0x7898('0x6'))(_0x7898('0x7'));var config=require(_0x7898('0x8'));var jayson=require(_0x7898('0x9'));var client=jayson[_0x7898('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0xd71b66,_0x2d9ea6,_0x35d16c){return new BPromise(function(_0x56347f,_0x2a88c2){return client[_0x7898('0xb')](_0xd71b66,_0x35d16c)['then'](function(_0x8db27){logger[_0x7898('0xc')](_0x7898('0xd'),_0x2d9ea6,'request\x20sent');logger[_0x7898('0xe')](_0x7898('0xf'),_0x2d9ea6,'request\x20sent',JSON['stringify'](_0x8db27));if(_0x8db27[_0x7898('0x10')]){if(_0x8db27['error']['code']===0x1f4){logger[_0x7898('0x10')](_0x7898('0xd'),_0x2d9ea6,_0x8db27[_0x7898('0x10')][_0x7898('0x11')]);return _0x2a88c2(_0x8db27[_0x7898('0x10')]['message']);}logger[_0x7898('0x10')]('ChatOfflineMessage,\x20%s,\x20%s',_0x2d9ea6,_0x8db27[_0x7898('0x10')][_0x7898('0x11')]);return _0x56347f(_0x8db27[_0x7898('0x10')][_0x7898('0x11')]);}else{logger[_0x7898('0xc')]('ChatOfflineMessage,\x20%s,\x20%s',_0x2d9ea6,_0x7898('0x12'));_0x56347f(_0x8db27[_0x7898('0x13')][_0x7898('0x11')]);}})['catch'](function(_0x26cb5a){logger['error'](_0x7898('0xd'),_0x2d9ea6,_0x26cb5a);_0x2a88c2(_0x26cb5a);});});}
\ No newline at end of file
+var _0x713d=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','ChatOfflineMessage,\x20%s,\x20%s','message','info','request\x20sent','catch','util'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x713d,0x16f));var _0xd713=function(_0x2b3d7d,_0x378a98){_0x2b3d7d=_0x2b3d7d-0x0;var _0x3c8c5d=_0x713d[_0x2b3d7d];return _0x3c8c5d;};'use strict';var _=require('lodash');var util=require(_0xd713('0x0'));var moment=require(_0xd713('0x1'));var BPromise=require(_0xd713('0x2'));var rs=require(_0xd713('0x3'));var fs=require('fs');var Redis=require(_0xd713('0x4'));var db=require(_0xd713('0x5'))['db'];var utils=require(_0xd713('0x6'));var logger=require(_0xd713('0x7'))(_0xd713('0x8'));var config=require(_0xd713('0x9'));var jayson=require(_0xd713('0xa'));var client=jayson['client'][_0xd713('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x304b8f,_0x55d5ab,_0x11cba5){return new BPromise(function(_0x383dda,_0x3ed51f){return client[_0xd713('0xc')](_0x304b8f,_0x11cba5)[_0xd713('0xd')](function(_0x58d702){logger['info']('ChatOfflineMessage,\x20%s,\x20%s',_0x55d5ab,'request\x20sent');logger[_0xd713('0xe')](_0xd713('0xf'),_0x55d5ab,'request\x20sent',JSON[_0xd713('0x10')](_0x58d702));if(_0x58d702[_0xd713('0x11')]){if(_0x58d702[_0xd713('0x11')]['code']===0x1f4){logger['error'](_0xd713('0x12'),_0x55d5ab,_0x58d702[_0xd713('0x11')]['message']);return _0x3ed51f(_0x58d702[_0xd713('0x11')][_0xd713('0x13')]);}logger['error']('ChatOfflineMessage,\x20%s,\x20%s',_0x55d5ab,_0x58d702['error']['message']);return _0x383dda(_0x58d702['error'][_0xd713('0x13')]);}else{logger[_0xd713('0x14')]('ChatOfflineMessage,\x20%s,\x20%s',_0x55d5ab,_0xd713('0x15'));_0x383dda(_0x58d702['result'][_0xd713('0x13')]);}})[_0xd713('0x16')](function(_0x229aaf){logger[_0xd713('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x55d5ab,_0x229aaf);_0x3ed51f(_0x229aaf);});});}
\ No newline at end of file