Built motion from commit e493b9a4954b50a8ee6d0034ba3601cd210d989d. Version 3.0.0...
[motion-next.git] / server / api / openchannelMessage / openchannelMessage.options.js
index 9074599..1f15749 100644 (file)
@@ -1 +1 @@
-const a588_0x2f5b=['request-promise-native','GET','format','omit','OpenchannelInteraction','Interaction','replyUri','describe','direction','then','catch','utf8mb4','error','Message\x20%d\x20forwarded\x20to\x20%s','options','body','get','api','OpenchannelAccount','length','Interactions','findOne','keys','isNil','inspect','utf8mb4_unicode_ci','OpenchannelMessage,\x20%s,\x20%s','threadId','afterCreate','info','../../config/logger','Contact','FULLTEXT','fti_openchannel_messages','createdAt','OpenchannelInteractionId','openchannel_messages','exports','toLowerCase','POST','secret','out','OpenchannelAccountId','find','UserId','models'];(function(_0x577f69,_0x1efc5b){const _0x2f5be2=function(_0x15d3a0){while(--_0x15d3a0){_0x577f69['push'](_0x577f69['shift']());}};_0x2f5be2(++_0x1efc5b);}(a588_0x2f5b,0x122));const a588_0x15d3=function(_0x577f69,_0x1efc5b){_0x577f69=_0x577f69-0x88;let _0x2f5be2=a588_0x2f5b[_0x577f69];return _0x2f5be2;};const a588_0x2cf06b=a588_0x15d3,util=require('util'),_=require('lodash'),logger=require(a588_0x2cf06b(0x98))(a588_0x2cf06b(0x8b)),rp=require(a588_0x2cf06b(0xa8));function options(_0x2b47c3){const _0x3039a1=a588_0x2cf06b;return{'sequelize':_0x2b47c3,'tableName':_0x3039a1(0x9e),'paranoid':![],'indexes':[{'name':_0x3039a1(0x9b),'fields':[_0x3039a1(0x89)],'type':_0x3039a1(0x9a)}],'timestamps':!![],'hooks':{'afterCreate':function(_0x189e25){const _0x69ded7=_0x3039a1,_0x348860=_0x2b47c3[_0x69ded7(0xa7)],_0x109302=_0x189e25[_0x69ded7(0x8a)]({'plain':!![]});(_0x109302['direction'][_0x69ded7(0xa0)]()==='in'||_0x109302[_0x69ded7(0xb0)][_0x69ded7(0xa0)]()===_0x69ded7(0xa3)&&!_0x109302['secret']&&!_[_0x69ded7(0x91)](_0x109302[_0x69ded7(0xa6)]))&&_0x348860[_0x69ded7(0xac)][_0x69ded7(0x8f)]({'where':{'id':_0x109302[_0x69ded7(0x9d)]}})[_0x69ded7(0xb1)](function(_0x4b12b0){const _0x4af336=_0x69ded7;_0x4b12b0&&_0x4b12b0['update']({'lastMsgAt':_0x109302[_0x4af336(0x9c)],'lastMsgDirection':_0x109302[_0x4af336(0xb0)][_0x4af336(0xa0)]()});})['catch'](function(_0x156d79){const _0x14aebb=_0x69ded7;console[_0x14aebb(0xb4)](_0x156d79);});if(_0x109302[_0x69ded7(0xb0)]==='out'&&!_0x109302[_0x69ded7(0xa2)]){let _0x258f9a;_0x348860['CmContact'][_0x69ded7(0xaf)]()[_0x69ded7(0xb1)](function(_0x34312d){const _0x516ec1=_0x69ded7;return _0x348860[_0x516ec1(0x8c)][_0x516ec1(0xa5)]({'where':{'id':_0x109302[_0x516ec1(0xa4)]},'include':[{'model':_0x348860[_0x516ec1(0xac)],'as':_0x516ec1(0x8e),'where':{'id':_0x109302['OpenchannelInteractionId']},'limit':0x1,'include':[{'model':_0x348860['CmContact'],'as':_0x516ec1(0x99),'attributes':_[_0x516ec1(0x90)](_0x34312d)}]}]});})[_0x69ded7(0xb1)](function(_0x3b7101){const _0x47f458=_0x69ded7;_0x258f9a=_0x3b7101['get']({'plain':!![]});if(_0x258f9a&&_0x258f9a[_0x47f458(0xae)]){logger[_0x47f458(0x97)]('OpenchannelMessage,\x20%s,\x20%s',_0x47f458(0x96),util[_0x47f458(0xaa)]('Forwarding\x20message\x20%d\x20to\x20%s',_0x109302['id'],_0x258f9a[_0x47f458(0xae)]));_0x258f9a[_0x47f458(0x8e)]&&_0x258f9a[_0x47f458(0x8e)][_0x47f458(0x8d)]&&(_0x109302[_0x47f458(0xad)]=_[_0x47f458(0xab)](_0x258f9a['Interactions'][0x0],_0x47f458(0x99)),_0x109302[_0x47f458(0x99)]=_0x258f9a['Interactions'][0x0][_0x47f458(0x99)]);const _0x390097={'method':'POST','uri':encodeURI(_0x258f9a['replyUri']),'json':!![],'resolveWithFullResponse':!![]};switch(_0x390097['method']){case _0x47f458(0xa9):_0x390097['qs']=_0x109302;break;case _0x47f458(0xa1):_0x390097[_0x47f458(0x89)]=_0x109302;break;}return rp(_0x390097)['then'](function(_0x3b59d9){const _0x950101=_0x47f458;logger[_0x950101(0x97)](_0x950101(0x94),_0x950101(0x96),util[_0x950101(0xaa)](_0x950101(0xb5),_0x109302['id'],_0x258f9a[_0x950101(0xae)]));if(_0x3b59d9[_0x950101(0x89)][_0x950101(0x95)]&&_0x3b59d9[_0x950101(0x89)][_0x950101(0x95)]!=_0x109302['Interaction']['threadId'])return _0x348860[_0x950101(0xac)]['update']({'threadId':_0x3b59d9[_0x950101(0x89)]['threadId']},{'logging':!![],'where':{'id':_0x109302[_0x950101(0xad)]['id']}});else return;})[_0x47f458(0xb1)](function(){return _0x189e25['update']({'read':!![]});})[_0x47f458(0xb2)](function(_0x192fa9){const _0x496e7f=_0x47f458;logger[_0x496e7f(0xb4)](_0x496e7f(0x94),_0x496e7f(0x96),util[_0x496e7f(0x92)](_0x192fa9,{'showHidden':![],'depth':null}));});}});}}},'charset':_0x3039a1(0xb3),'collate':_0x3039a1(0x93)};}module[a588_0x2cf06b(0x9f)][a588_0x2cf06b(0x88)]=options;
\ No newline at end of file
+const a588_0x5343=['Contact','direction','length','toLowerCase','exports','afterCreate','get','23643yKXPhT','body','753EwPGkF','1211183JwyMNf','utf8mb4_unicode_ci','util','Interactions','fti_openchannel_messages','info','OpenchannelInteractionId','format','options','GET','createdAt','354895NenkRE','UserId','28859keQPWS','@utils/console-logger','OpenchannelAccount','57DkYKrv','utf8mb4','3issnhL','threadId','OpenchannelInteraction','keys','api','update','OpenchannelAccountId','describe','4058UcGmiv','@config/logger','request-promise-native','CmContact','296229EvgBoh','catch','1hdqQmF','error','replyUri','secret','Interaction','OpenchannelMessage,\x20%s,\x20%s','omit','lodash','POST','278811gCTtbQ','inspect','Forwarding\x20message\x20%d\x20to\x20%s','3cKrIOe','then'];const a588_0x58cb=function(_0x2c13dc,_0x436b6f){_0x2c13dc=_0x2c13dc-0xc5;let _0x5343c0=a588_0x5343[_0x2c13dc];return _0x5343c0;};const a588_0x3de77c=a588_0x58cb;(function(_0x2d4b56,_0x5523d9){const _0x32cc3a=a588_0x58cb;while(!![]){try{const _0xc531ec=parseInt(_0x32cc3a(0xd3))+parseInt(_0x32cc3a(0xe3))*-parseInt(_0x32cc3a(0xd0))+-parseInt(_0x32cc3a(0xde))*parseInt(_0x32cc3a(0xc7))+-parseInt(_0x32cc3a(0xe5))*parseInt(_0x32cc3a(0xf1))+-parseInt(_0x32cc3a(0xfc))+-parseInt(_0x32cc3a(0xf3))*-parseInt(_0x32cc3a(0xe0))+parseInt(_0x32cc3a(0xed))*parseInt(_0x32cc3a(0xd2));if(_0xc531ec===_0x5523d9)break;else _0x2d4b56['push'](_0x2d4b56['shift']());}catch(_0x2d68d6){_0x2d4b56['push'](_0x2d4b56['shift']());}}}(a588_0x5343,0xaec6a));const util=require(a588_0x3de77c(0xd5)),_=require(a588_0x3de77c(0xfa)),logger=require(a588_0x3de77c(0xee))(a588_0x3de77c(0xe9)),rp=require(a588_0x3de77c(0xef)),{consoleLogger}=require(a588_0x3de77c(0xe1));function options(_0x2c49b1){const _0xdf0bc=a588_0x3de77c;return{'sequelize':_0x2c49b1,'tableName':'openchannel_messages','paranoid':![],'indexes':[{'name':_0xdf0bc(0xd7),'fields':[_0xdf0bc(0xd1)],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0xdacc19){const _0x2a84ac=_0xdf0bc,_0xc35530=_0x2c49b1['models'],_0x394faa=_0xdacc19[_0x2a84ac(0xcf)]({'plain':!![]});(_0x394faa[_0x2a84ac(0xca)][_0x2a84ac(0xcc)]()==='in'||_0x394faa['direction'][_0x2a84ac(0xcc)]()==='out'&&!_0x394faa[_0x2a84ac(0xf6)]&&!_['isNil'](_0x394faa[_0x2a84ac(0xdf)]))&&_0xc35530[_0x2a84ac(0xe7)]['findOne']({'where':{'id':_0x394faa[_0x2a84ac(0xd9)]}})['then'](function(_0x5a3347){const _0x3856ad=_0x2a84ac;_0x5a3347&&_0x5a3347[_0x3856ad(0xea)]({'lastMsgAt':_0x394faa[_0x3856ad(0xdd)],'lastMsgDirection':_0x394faa[_0x3856ad(0xca)][_0x3856ad(0xcc)]()});})[_0x2a84ac(0xf2)](function(_0x110968){const _0x2d4f4b=_0x2a84ac;consoleLogger[_0x2d4f4b(0xf4)](_0x110968);});if(_0x394faa['direction']==='out'&&!_0x394faa[_0x2a84ac(0xf6)]){let _0x401fda;_0xc35530[_0x2a84ac(0xf0)][_0x2a84ac(0xec)]()[_0x2a84ac(0xc8)](function(_0x59577a){const _0x3cafc0=_0x2a84ac;return _0xc35530[_0x3cafc0(0xe2)]['findOne']({'where':{'id':_0x394faa[_0x3cafc0(0xeb)]},'include':[{'model':_0xc35530[_0x3cafc0(0xe7)],'as':_0x3cafc0(0xd6),'where':{'id':_0x394faa[_0x3cafc0(0xd9)]},'limit':0x1,'include':[{'model':_0xc35530[_0x3cafc0(0xf0)],'as':_0x3cafc0(0xc9),'attributes':_[_0x3cafc0(0xe8)](_0x59577a)}]}]});})[_0x2a84ac(0xc8)](function(_0x10b673){const _0x24ffda=_0x2a84ac;_0x401fda=_0x10b673[_0x24ffda(0xcf)]({'plain':!![]});if(_0x401fda&&_0x401fda['replyUri']){logger[_0x24ffda(0xd8)](_0x24ffda(0xf8),_0x24ffda(0xce),util[_0x24ffda(0xda)](_0x24ffda(0xc6),_0x394faa['id'],_0x401fda['replyUri']));_0x401fda['Interactions']&&_0x401fda[_0x24ffda(0xd6)][_0x24ffda(0xcb)]&&(_0x394faa[_0x24ffda(0xf7)]=_[_0x24ffda(0xf9)](_0x401fda['Interactions'][0x0],'Contact'),_0x394faa[_0x24ffda(0xc9)]=_0x401fda[_0x24ffda(0xd6)][0x0][_0x24ffda(0xc9)]);const _0x1c053b={'method':'POST','uri':encodeURI(_0x401fda['replyUri']),'json':!![],'resolveWithFullResponse':!![]};switch(_0x1c053b['method']){case _0x24ffda(0xdc):_0x1c053b['qs']=_0x394faa;break;case _0x24ffda(0xfb):_0x1c053b[_0x24ffda(0xd1)]=_0x394faa;break;}return rp(_0x1c053b)[_0x24ffda(0xc8)](function(_0x5b7105){const _0x402bdb=_0x24ffda;logger[_0x402bdb(0xd8)](_0x402bdb(0xf8),_0x402bdb(0xce),util[_0x402bdb(0xda)]('Message\x20%d\x20forwarded\x20to\x20%s',_0x394faa['id'],_0x401fda[_0x402bdb(0xf5)]));const _0x2cf663=_0x5b7105?.['body']?.[_0x402bdb(0xe6)]??![];if(_0x2cf663!==![]&&_0x2cf663!==_0x394faa[_0x402bdb(0xf7)][_0x402bdb(0xe6)])return _0xc35530[_0x402bdb(0xe7)][_0x402bdb(0xea)]({'threadId':_0x5b7105[_0x402bdb(0xd1)][_0x402bdb(0xe6)]},{'logging':!![],'where':{'id':_0x394faa[_0x402bdb(0xf7)]['id']}});else return;})['then'](function(){return _0xdacc19['update']({'read':!![]});})[_0x24ffda(0xf2)](function(_0x37d8fc){const _0x45d5a1=_0x24ffda;logger[_0x45d5a1(0xf4)]('OpenchannelMessage,\x20%s,\x20%s',_0x45d5a1(0xce),util[_0x45d5a1(0xc5)](_0x37d8fc,{'showHidden':![],'depth':null}));});}});}}},'charset':_0xdf0bc(0xe4),'collate':_0xdf0bc(0xd4)};}module[a588_0x3de77c(0xcd)][a588_0x3de77c(0xdb)]=options;
\ No newline at end of file