Built motion from commit aab208717af8d15f4fa224cdb6a202877019af9b. Version 3.0.0...
[motion-next.git] / server / api / chatInteraction / chatInteraction.rpc.js
index f97ed82..efbb2f5 100644 (file)
@@ -1 +1 @@
-const a69_0x2de5=['catch','omit','AddTags','update','debug','error','attributes','UpdateChatInteraction','raw','stringify','body','info','./chatInteraction.socket','then','register','ChatInteraction','findOne','where','addTags','../../config/logger','ids','../../mysqldb','message','limit','options'];(function(_0x2cd8c7,_0x2de52e){const _0x2998cb=function(_0x130004){while(--_0x130004){_0x2cd8c7['push'](_0x2cd8c7['shift']());}};_0x2998cb(++_0x2de52e);}(a69_0x2de5,0x1dc));const a69_0x2998=function(_0x2cd8c7,_0x2de52e){_0x2cd8c7=_0x2cd8c7-0x0;let _0x2998cb=a69_0x2de5[_0x2cd8c7];return _0x2998cb;};const _0x18070a=a69_0x2998;'use strict';const _=require('lodash'),db=require(_0x18070a('0x14'))['db'],logger=require(_0x18070a('0x12'))('rpc'),{getSocket}=require('../../rediscache'),socket=getSocket();require(_0x18070a('0xb'))[_0x18070a('0xd')](socket),exports['UpdateChatInteraction']=function(_0x130004){const _0x2d1dec=this;return new Promise(function(_0x4fbfc9,_0x310c5f){const _0xb44d74=a69_0x2998;return db[_0xb44d74('0xe')][_0xb44d74('0x2')](_0x130004['body'],{'raw':_0x130004[_0xb44d74('0x17')]?_0x130004[_0xb44d74('0x17')][_0xb44d74('0x7')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x130004[_0xb44d74('0x17')]?_0x130004[_0xb44d74('0x17')][_0xb44d74('0x10')]||null:null,'attributes':_0x130004['options']?_0x130004['options'][_0xb44d74('0x5')]||null:null,'limit':_0x130004[_0xb44d74('0x17')]?_0x130004[_0xb44d74('0x17')][_0xb44d74('0x16')]||null:null})[_0xb44d74('0xc')](function(_0x5a8242){const _0x3cb441=_0xb44d74;logger[_0x3cb441('0xa')](_0x3cb441('0x6'),_0x130004),logger[_0x3cb441('0x3')](_0x3cb441('0x6'),_0x130004,JSON[_0x3cb441('0x8')](_0x5a8242)),_0x4fbfc9(_0x5a8242);})[_0xb44d74('0x18')](function(_0x1a74fb){const _0x500b61=_0xb44d74;logger[_0x500b61('0x4')](_0x500b61('0x6'),_0x1a74fb[_0x500b61('0x15')],_0x130004),_0x310c5f(_0x2d1dec[_0x500b61('0x4')](0x1f4,_0x1a74fb[_0x500b61('0x15')]));});});},exports['AddTagsToChatInteraction']=function(_0x39e6b4){const _0x44d76b=this;return new Promise(function(_0x27c5e4,_0x2ec8f2){const _0x59f41f=a69_0x2998;return db['ChatInteraction'][_0x59f41f('0xf')]({'where':_0x39e6b4['options']?_0x39e6b4[_0x59f41f('0x17')]['where']||null:null})[_0x59f41f('0xc')](function(_0x4278c1){const _0x2d9c69=_0x59f41f;if(_0x4278c1)return _0x4278c1[_0x2d9c69('0x11')](_0x39e6b4[_0x2d9c69('0x9')][_0x2d9c69('0x13')],{'through':_[_0x2d9c69('0x0')](_0x39e6b4[_0x2d9c69('0x9')],[_0x2d9c69('0x13'),'id'])});})['then'](function([_0xfbaf3b]){const _0x5d8995=_0x59f41f;logger[_0x5d8995('0xa')](_0x5d8995('0x1'),_0x39e6b4),logger[_0x5d8995('0x3')](_0x5d8995('0x1'),_0x39e6b4,JSON[_0x5d8995('0x8')](_0xfbaf3b)),_0x27c5e4(_0xfbaf3b);})[_0x59f41f('0x18')](function(_0x5f6013){const _0x39afc9=_0x59f41f;logger[_0x39afc9('0x4')](_0x39afc9('0x1'),_0x5f6013['message'],_0x39e6b4),_0x2ec8f2(_0x44d76b[_0x39afc9('0x4')](0x1f4,_0x5f6013[_0x39afc9('0x15')]));});});};
\ No newline at end of file
+const a69_0x2c9e=['options','body','UpdateChatInteraction','../../rediscache','rpc','update','omit','attributes','message','error','ChatInteraction','AddTags','where','./chatInteraction.socket','catch','../../mysqldb','findOne','stringify','../../config/logger','then','info'];(function(_0x520e64,_0x2c9e36){const _0x4ee16f=function(_0x37fec2){while(--_0x37fec2){_0x520e64['push'](_0x520e64['shift']());}};_0x4ee16f(++_0x2c9e36);}(a69_0x2c9e,0x1c1));const a69_0x4ee1=function(_0x520e64,_0x2c9e36){_0x520e64=_0x520e64-0x0;let _0x4ee16f=a69_0x2c9e[_0x520e64];return _0x4ee16f;};const _0x3cc5d3=a69_0x4ee1;'use strict';const _=require('lodash'),db=require(_0x3cc5d3('0x7'))['db'],logger=require(_0x3cc5d3('0xa'))(_0x3cc5d3('0x11')),{getSocket}=require(_0x3cc5d3('0x10')),socket=getSocket();require(_0x3cc5d3('0x5'))['register'](socket),exports[_0x3cc5d3('0xf')]=function(_0x37fec2){const _0x14db0d=this;return new Promise(function(_0x2ecda4,_0x44393c){const _0x68e92a=a69_0x4ee1;return db[_0x68e92a('0x2')][_0x68e92a('0x12')](_0x37fec2[_0x68e92a('0xe')],{'raw':_0x37fec2[_0x68e92a('0xd')]?_0x37fec2[_0x68e92a('0xd')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x37fec2[_0x68e92a('0xd')]?_0x37fec2['options']['where']||null:null,'attributes':_0x37fec2['options']?_0x37fec2['options'][_0x68e92a('0x14')]||null:null,'limit':_0x37fec2['options']?_0x37fec2['options']['limit']||null:null})[_0x68e92a('0xb')](function(_0x1db6b8){const _0x283bf1=_0x68e92a;logger[_0x283bf1('0xc')](_0x283bf1('0xf'),_0x37fec2),logger['debug']('UpdateChatInteraction',_0x37fec2,JSON[_0x283bf1('0x9')](_0x1db6b8)),_0x2ecda4(_0x1db6b8);})[_0x68e92a('0x6')](function(_0x2e85c8){const _0x2cb76d=_0x68e92a;logger[_0x2cb76d('0x1')]('UpdateChatInteraction',_0x2e85c8[_0x2cb76d('0x0')],_0x37fec2),_0x44393c(_0x14db0d[_0x2cb76d('0x1')](0x1f4,_0x2e85c8[_0x2cb76d('0x0')]));});});},exports['AddTagsToChatInteraction']=function(_0xa2fe){const _0x130c5c=this;return new Promise(function(_0xeabdf9,_0x252238){const _0x3fcebf=a69_0x4ee1;return db[_0x3fcebf('0x2')][_0x3fcebf('0x8')]({'where':_0xa2fe[_0x3fcebf('0xd')]?_0xa2fe['options'][_0x3fcebf('0x4')]||null:null})[_0x3fcebf('0xb')](function(_0x20b56d){const _0x3d163c=_0x3fcebf;if(_0x20b56d)return _0x20b56d['addTags'](_0xa2fe[_0x3d163c('0xe')]['ids'],{'through':_[_0x3d163c('0x13')](_0xa2fe[_0x3d163c('0xe')],['ids','id'])});})[_0x3fcebf('0xb')](function([_0x595835]){const _0xdbab5=_0x3fcebf;logger[_0xdbab5('0xc')]('AddTags',_0xa2fe),logger['debug'](_0xdbab5('0x3'),_0xa2fe,JSON['stringify'](_0x595835)),_0xeabdf9(_0x595835);})['catch'](function(_0x43e633){const _0x28ca3a=_0x3fcebf;logger[_0x28ca3a('0x1')](_0x28ca3a('0x3'),_0x43e633[_0x28ca3a('0x0')],_0xa2fe),_0x252238(_0x130c5c['error'](0x1f4,_0x43e633[_0x28ca3a('0x0')]));});});};
\ No newline at end of file