Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / openchannelInteraction / openchannelInteraction.events.js
index 2a95b93..5078119 100644 (file)
@@ -1 +1 @@
-const a578_0x456a=['../../mysqldb','undefined','setDataValue','remove','events','catch','findAll','unreadMessages','getUsers','OpenchannelMessage','addHook','setMaxListeners','exports','then','save','emit','Users','update','length'];(function(_0x13c9b9,_0x4cebc8){const _0x456ab8=function(_0x2ac2ed){while(--_0x2ac2ed){_0x13c9b9['push'](_0x13c9b9['shift']());}};_0x456ab8(++_0x4cebc8);}(a578_0x456a,0x1b9));const a578_0x2ac2=function(_0x13c9b9,_0x4cebc8){_0x13c9b9=_0x13c9b9-0xa1;let _0x456ab8=a578_0x456a[_0x13c9b9];return _0x456ab8;};const a578_0x54486f=a578_0x2ac2;'use strict';const EventEmitter=require(a578_0x54486f(0xa1)),OpenchannelInteraction=require('../../mysqldb')['db']['OpenchannelInteraction'],OpenchannelMessage=require(a578_0x54486f(0xb0))['db'][a578_0x54486f(0xa6)],OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[a578_0x54486f(0xa8)](0x0);const events={'afterCreate':a578_0x54486f(0xab),'afterUpdate':a578_0x54486f(0xae),'afterDestroy':a578_0x54486f(0xb3)};function emitEvent(_0x383810){return function(_0x44ae22){const _0x5ac1a6=a578_0x2ac2;_0x44ae22[_0x5ac1a6(0xa5)]({'attributes':['id'],'raw':!![]})[_0x5ac1a6(0xaa)](function(_0x5f078b){const _0x5369c8=_0x5ac1a6;return _0x44ae22['setDataValue'](_0x5369c8(0xad),_0x5f078b['map'](function(_0x58f53e){return{'id':_0x58f53e['id']};})),OpenchannelMessage[_0x5369c8(0xa3)]({'where':{'OpenchannelInteractionId':_0x44ae22['id'],'direction':'in','read':![]},'raw':!![]});})[_0x5ac1a6(0xaa)](function(_0x5edddd){const _0x2d1212=_0x5ac1a6;_0x44ae22[_0x2d1212(0xb2)](_0x2d1212(0xa4),_0x5edddd[_0x2d1212(0xaf)]),OpenchannelInteractionEvents['emit'](_0x383810+':'+_0x44ae22['id'],_0x44ae22),OpenchannelInteractionEvents[_0x2d1212(0xac)](_0x383810,_0x44ae22);})[_0x5ac1a6(0xa2)](()=>{});};}for(const e in events){if(typeof events[e]!==a578_0x54486f(0xb1)){const event=events[e];OpenchannelInteraction[a578_0x54486f(0xa7)](e,emitEvent(event));}}module[a578_0x54486f(0xa9)]=OpenchannelInteractionEvents;
\ No newline at end of file
+const a578_0x1ee3=['then','map','Users','remove','undefined','setMaxListeners','exports','findAll','OpenchannelInteraction','emit','save','../../mysqldb','events','catch','OpenchannelMessage','getUsers','setDataValue'];(function(_0x4e5018,_0x755062){const _0x1ee31a=function(_0x295d17){while(--_0x295d17){_0x4e5018['push'](_0x4e5018['shift']());}};_0x1ee31a(++_0x755062);}(a578_0x1ee3,0x1c0));const a578_0x295d=function(_0x4e5018,_0x755062){_0x4e5018=_0x4e5018-0x177;let _0x1ee31a=a578_0x1ee3[_0x4e5018];return _0x1ee31a;};const a578_0x13a979=a578_0x295d;'use strict';const EventEmitter=require(a578_0x13a979(0x17d)),OpenchannelInteraction=require('../../mysqldb')['db'][a578_0x13a979(0x179)],OpenchannelMessage=require(a578_0x13a979(0x17c))['db'][a578_0x13a979(0x17f)],OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[a578_0x13a979(0x187)](0x0);const events={'afterCreate':a578_0x13a979(0x17b),'afterUpdate':'update','afterDestroy':a578_0x13a979(0x185)};function emitEvent(_0x17eb65){return function(_0x39e369){const _0x4a7896=a578_0x295d;_0x39e369[_0x4a7896(0x180)]({'attributes':['id'],'raw':!![]})[_0x4a7896(0x182)](function(_0x2d0735){const _0x2fadd5=_0x4a7896;return _0x39e369[_0x2fadd5(0x181)](_0x2fadd5(0x184),_0x2d0735[_0x2fadd5(0x183)](function(_0x4eaa98){return{'id':_0x4eaa98['id']};})),OpenchannelMessage[_0x2fadd5(0x178)]({'where':{'OpenchannelInteractionId':_0x39e369['id'],'direction':'in','read':![]},'raw':!![]});})[_0x4a7896(0x182)](function(_0xf026bf){const _0x5f0c62=_0x4a7896;_0x39e369['setDataValue']('unreadMessages',_0xf026bf['length']),OpenchannelInteractionEvents[_0x5f0c62(0x17a)](_0x17eb65+':'+_0x39e369['id'],_0x39e369),OpenchannelInteractionEvents[_0x5f0c62(0x17a)](_0x17eb65,_0x39e369);})[_0x4a7896(0x17e)](()=>{});};}for(const e in events){if(typeof events[e]!==a578_0x13a979(0x186)){const event=events[e];OpenchannelInteraction['addHook'](e,emitEvent(event));}}module[a578_0x13a979(0x177)]=OpenchannelInteractionEvents;
\ No newline at end of file