Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / api / chatMessage / chatMessage.model.js
index 0781728..4a4d138 100644 (file)
@@ -1 +1 @@
-const a82_0x2410=['ChatMessage','then','models','lodash','UserId','secret','out','toLowerCase','findOne','error','utf8mb4','utf8mb4_unicode_ci','isNil','createdAt','body','fti_chat_messages','get','exports','update','chat_messages','direction'];(function(_0x14e87d,_0x24104e){const _0x507bab=function(_0x52f910){while(--_0x52f910){_0x14e87d['push'](_0x14e87d['shift']());}};_0x507bab(++_0x24104e);}(a82_0x2410,0x166));const a82_0x507b=function(_0x14e87d,_0x24104e){_0x14e87d=_0x14e87d-0x0;let _0x507bab=a82_0x2410[_0x14e87d];return _0x507bab;};const _0x3f4c36=a82_0x507b;'use strict';const _=require(_0x3f4c36('0x2')),attributes=require('./chatMessage.attributes');module[_0x3f4c36('0x10')]=function(_0x52f910){const _0x118a9a=_0x3f4c36,_0x5a1ee8=_0x52f910[_0x118a9a('0x1')],_0x206e92=_0x52f910['define'](_0x118a9a('0x14'),attributes,{'tableName':_0x118a9a('0x12'),'paranoid':![],'indexes':[{'name':_0x118a9a('0xe'),'fields':[_0x118a9a('0xd')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x328545){const _0x2a9343=_0x118a9a,_0x107d29=_0x328545[_0x2a9343('0xf')]({'plain':!![]});(_0x107d29[_0x2a9343('0x13')][_0x2a9343('0x6')]()==='in'||_0x107d29[_0x2a9343('0x13')][_0x2a9343('0x6')]()===_0x2a9343('0x5')&&!_0x107d29[_0x2a9343('0x4')]&&!_[_0x2a9343('0xb')](_0x107d29[_0x2a9343('0x3')]))&&_0x5a1ee8['ChatInteraction'][_0x2a9343('0x7')]({'where':{'id':_0x107d29['ChatInteractionId']}})[_0x2a9343('0x0')](function(_0x568fb0){const _0x39afdb=_0x2a9343;_0x568fb0&&_0x568fb0[_0x39afdb('0x11')]({'lastMsgAt':_0x107d29[_0x39afdb('0xc')],'lastMsgDirection':_0x107d29[_0x39afdb('0x13')]['toLowerCase']()});})['catch'](function(_0xabf348){const _0x4e9f67=_0x2a9343;console[_0x4e9f67('0x8')](_0xabf348);});}},'charset':_0x118a9a('0x9'),'collate':_0x118a9a('0xa')});return _0x206e92;};
\ No newline at end of file
+const a82_0x1243=['toLowerCase','chat_messages','UserId','isNil','ChatInteraction','models','findOne','ChatMessage','lodash','get','secret','body','catch','direction','out','FULLTEXT','update','define','createdAt','error','then','./chatMessage.attributes'];(function(_0x5a5339,_0x124365){const _0x28c34b=function(_0x316b93){while(--_0x316b93){_0x5a5339['push'](_0x5a5339['shift']());}};_0x28c34b(++_0x124365);}(a82_0x1243,0x87));const a82_0x28c3=function(_0x5a5339,_0x124365){_0x5a5339=_0x5a5339-0x0;let _0x28c34b=a82_0x1243[_0x5a5339];return _0x28c34b;};const _0x3c5920=a82_0x28c3;'use strict';const _=require(_0x3c5920('0x5')),attributes=require(_0x3c5920('0x12'));module['exports']=function(_0x316b93){const _0x413e1f=_0x3c5920,_0x49b597=_0x316b93[_0x413e1f('0x2')],_0x51c93c=_0x316b93[_0x413e1f('0xe')](_0x413e1f('0x4'),attributes,{'tableName':_0x413e1f('0x14'),'paranoid':![],'indexes':[{'name':'fti_chat_messages','fields':[_0x413e1f('0x8')],'type':_0x413e1f('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x4333e1){const _0x6a3d13=_0x413e1f,_0x58761f=_0x4333e1[_0x6a3d13('0x6')]({'plain':!![]});(_0x58761f[_0x6a3d13('0xa')]['toLowerCase']()==='in'||_0x58761f[_0x6a3d13('0xa')][_0x6a3d13('0x13')]()===_0x6a3d13('0xb')&&!_0x58761f[_0x6a3d13('0x7')]&&!_[_0x6a3d13('0x0')](_0x58761f[_0x6a3d13('0x15')]))&&_0x49b597[_0x6a3d13('0x1')][_0x6a3d13('0x3')]({'where':{'id':_0x58761f['ChatInteractionId']}})[_0x6a3d13('0x11')](function(_0x23544f){const _0x4076cd=_0x6a3d13;_0x23544f&&_0x23544f[_0x4076cd('0xd')]({'lastMsgAt':_0x58761f[_0x4076cd('0xf')],'lastMsgDirection':_0x58761f[_0x4076cd('0xa')][_0x4076cd('0x13')]()});})[_0x6a3d13('0x9')](function(_0x45374d){const _0x3b3dd5=_0x6a3d13;console[_0x3b3dd5('0x10')](_0x45374d);});}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});return _0x51c93c;};
\ No newline at end of file