Built motion from commit 67e5df37.|2.0.61
[motion2.git] / server / api / chatQueue / chatQueue.rpc.js
1 var _0xbccc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0xbccc[0];var _=require(_0xbccc[1]);var util=require(_0xbccc[2]);var moment=require(_0xbccc[3]);var BPromise=require(_0xbccc[4]);var rs=require(_0xbccc[5]);var fs=require(_0xbccc[6]);var db=require(_0xbccc[8])[_0xbccc[7]];var utils=require(_0xbccc[9]);var logger=require(_0xbccc[11])(_0xbccc[10]);var config=require(_0xbccc[12]);var jayson=require(_0xbccc[13]);var client=jayson[_0xbccc[15]][_0xbccc[14]]({port:9002});var socket=require(_0xbccc[17])({host:_0xbccc[16],port:6379});require(_0xbccc[19])[_0xbccc[18]](socket);function respondWithRpcPromise(_0xa6bcxf,_0xa6bcx10,_0xa6bcx11){return  new BPromise(function(_0xa6bcx12,_0xa6bcx13){return client[_0xbccc[32]](_0xa6bcxf,_0xa6bcx11)[_0xbccc[31]](function(_0xa6bcx15){logger[_0xbccc[24]](_0xbccc[20],_0xa6bcx10,_0xbccc[23]);logger[_0xbccc[27]](_0xbccc[25],_0xa6bcx10,_0xbccc[23],JSON[_0xbccc[26]](_0xa6bcx15));if(_0xa6bcx15[_0xbccc[21]]){if(_0xa6bcx15[_0xbccc[21]][_0xbccc[28]]=== 500){logger[_0xbccc[21]](_0xbccc[20],_0xa6bcx10,_0xa6bcx15[_0xbccc[21]][_0xbccc[29]]);return _0xa6bcx13(_0xa6bcx15[_0xbccc[21]][_0xbccc[29]])};logger[_0xbccc[21]](_0xbccc[20],_0xa6bcx10,_0xa6bcx15[_0xbccc[21]][_0xbccc[29]]);return _0xa6bcx12(_0xa6bcx15[_0xbccc[21]][_0xbccc[29]])}else {logger[_0xbccc[24]](_0xbccc[20],_0xa6bcx10,_0xbccc[23]);_0xa6bcx12(_0xa6bcx15[_0xbccc[30]][_0xbccc[29]])}})[_0xbccc[22]](function(_0xa6bcx14){logger[_0xbccc[21]](_0xbccc[20],_0xa6bcx10,_0xa6bcx14);_0xa6bcx13(_0xa6bcx14)})})}exports[_0xbccc[33]]= function(_0xa6bcx11){var _0xa6bcx16=this;return  new Promise(function(_0xa6bcx12,_0xa6bcx13){return db[_0xbccc[44]][_0xbccc[43]]({raw:_0xa6bcx11[_0xbccc[34]]?(_0xa6bcx11[_0xbccc[34]][_0xbccc[35]]=== undefined)?true:false:true,where:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[36]]|| null:null,attributes:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[37]]|| null:null,limit:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[38]]|| null:null,include:_0xa6bcx11[_0xbccc[34]]?(_0xa6bcx11[_0xbccc[34]][_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx11[_0xbccc[34]][_0xbccc[39]],function(_0xa6bcx17){return {model:db[_0xa6bcx17[_0xbccc[40]]],as:_0xa6bcx17[_0xbccc[41]],attributes:_0xa6bcx17[_0xbccc[37]],include:_0xa6bcx17[_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx17[_0xbccc[39]],function(_0xa6bcx18){return {model:db[_0xa6bcx18[_0xbccc[40]]],as:_0xa6bcx18[_0xbccc[41]],attributes:_0xa6bcx18[_0xbccc[37]],include:_0xa6bcx18[_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx18[_0xbccc[39]],function(_0xa6bcx19){return {model:db[_0xa6bcx19[_0xbccc[40]]],as:_0xa6bcx19[_0xbccc[41]],attributes:_0xa6bcx19[_0xbccc[37]]}}):[]}}):[]}}):[]):[]})[_0xbccc[31]](function(_0xa6bcx15){logger[_0xbccc[24]](_0xbccc[33],_0xa6bcx11);logger[_0xbccc[27]](_0xbccc[33],_0xa6bcx11,JSON[_0xbccc[26]](_0xa6bcx15));_0xa6bcx12(_0xa6bcx15)})[_0xbccc[22]](function(_0xa6bcx14){logger[_0xbccc[21]](_0xbccc[33],_0xa6bcx14[_0xbccc[29]],_0xa6bcx11);_0xa6bcx13(_0xa6bcx16[_0xbccc[21]](500,_0xa6bcx14[_0xbccc[29]]))})})};exports[_0xbccc[45]]= function(_0xa6bcx11){var _0xa6bcx16=this;return  new Promise(function(_0xa6bcx12,_0xa6bcx13){return db[_0xbccc[44]][_0xbccc[46]]({raw:_0xa6bcx11[_0xbccc[34]]?(_0xa6bcx11[_0xbccc[34]][_0xbccc[35]]=== undefined)?true:false:true,where:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[36]]|| null:null,attributes:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[37]]|| null:null,include:_0xa6bcx11[_0xbccc[34]]?(_0xa6bcx11[_0xbccc[34]][_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx11[_0xbccc[34]][_0xbccc[39]],function(_0xa6bcx17){return {model:db[_0xa6bcx17[_0xbccc[40]]],as:_0xa6bcx17[_0xbccc[41]],attributes:_0xa6bcx17[_0xbccc[37]],include:_0xa6bcx17[_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx17[_0xbccc[39]],function(_0xa6bcx18){return {model:db[_0xa6bcx18[_0xbccc[40]]],as:_0xa6bcx18[_0xbccc[41]],attributes:_0xa6bcx18[_0xbccc[37]],include:_0xa6bcx18[_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx18[_0xbccc[39]],function(_0xa6bcx19){return {model:db[_0xa6bcx19[_0xbccc[40]]],as:_0xa6bcx19[_0xbccc[41]],attributes:_0xa6bcx19[_0xbccc[37]]}}):[]}}):[]}}):[]):[]})[_0xbccc[31]](function(_0xa6bcx15){logger[_0xbccc[24]](_0xbccc[45],_0xa6bcx11);logger[_0xbccc[27]](_0xbccc[45],_0xa6bcx11,JSON[_0xbccc[26]](_0xa6bcx15));_0xa6bcx12(_0xa6bcx15)})[_0xbccc[22]](function(_0xa6bcx14){logger[_0xbccc[21]](_0xbccc[45],_0xa6bcx14[_0xbccc[29]],_0xa6bcx11);_0xa6bcx13(_0xa6bcx16[_0xbccc[21]](500,_0xa6bcx14[_0xbccc[29]]))})})}