Built motion from commit (unavailable).|2.4.7
[motion2.git] / server / api / chatMessage / chatMessage.model.js
index f83e7ef..4e96cd8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf57f=['define','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT','get','direction','toLowerCase','out','isNil','UserId','findOne','then','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./chatMessage.attributes'];(function(_0x565d0a,_0x4927cc){var _0x24c211=function(_0x18ae2b){while(--_0x18ae2b){_0x565d0a['push'](_0x565d0a['shift']());}};_0x24c211(++_0x4927cc);}(_0xf57f,0x6e));var _0xff57=function(_0x258919,_0x1754e6){_0x258919=_0x258919-0x0;var _0xfbd68b=_0xf57f[_0x258919];return _0xfbd68b;};'use strict';var _=require(_0xff57('0x0'));var util=require(_0xff57('0x1'));var logger=require(_0xff57('0x2'))(_0xff57('0x3'));var moment=require(_0xff57('0x4'));var BPromise=require(_0xff57('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xff57('0x6'));var rimraf=require(_0xff57('0x7'));var config=require(_0xff57('0x8'));var attributes=require(_0xff57('0x9'));module['exports']=function(_0x102c8c,_0x41af65){return _0x102c8c[_0xff57('0xa')](_0xff57('0xb'),attributes,{'tableName':_0xff57('0xc'),'paranoid':![],'indexes':[{'name':_0xff57('0xd'),'fields':[_0xff57('0xe')],'type':_0xff57('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2cccc0,_0x4fe0ad,_0x266ac3){var _0x1511c5=_0x102c8c['models'];var _0x2dc7ca=_0x2cccc0[_0xff57('0x10')]({'plain':!![]});if(_0x2dc7ca[_0xff57('0x11')][_0xff57('0x12')]()==='in'||_0x2dc7ca[_0xff57('0x11')]['toLowerCase']()===_0xff57('0x13')&&!_0x2dc7ca['secret']&&!_[_0xff57('0x14')](_0x2dc7ca[_0xff57('0x15')])){_0x1511c5['ChatInteraction'][_0xff57('0x16')]({'where':{'id':_0x2dc7ca['ChatInteractionId']}})[_0xff57('0x17')](function(_0x2a2f4f){if(_0x2a2f4f){_0x2a2f4f[_0xff57('0x18')]({'lastMsgAt':_0x2dc7ca[_0xff57('0x19')],'lastMsgDirection':_0x2dc7ca[_0xff57('0x11')][_0xff57('0x12')]()});}})[_0xff57('0x1a')](function(_0x49e425){console[_0xff57('0x1b')](_0x49e425);});}_0x266ac3();}},'charset':_0xff57('0x1c'),'collate':_0xff57('0x1d')});};
\ No newline at end of file
+var _0x4b04=['body','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','UserId','ChatInteraction','findOne','ChatInteractionId','then','update','createdAt','catch','error','utf8mb4','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatMessage.attributes','chat_messages','fti_chat_messages'];(function(_0x4839c5,_0x241112){var _0x5de033=function(_0x1a1341){while(--_0x1a1341){_0x4839c5['push'](_0x4839c5['shift']());}};_0x5de033(++_0x241112);}(_0x4b04,0xc7));var _0x44b0=function(_0x213413,_0x5cd8c1){_0x213413=_0x213413-0x0;var _0x6d4346=_0x4b04[_0x213413];return _0x6d4346;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x44b0('0x0'))(_0x44b0('0x1'));var moment=require(_0x44b0('0x2'));var BPromise=require(_0x44b0('0x3'));var rp=require(_0x44b0('0x4'));var fs=require('fs');var path=require(_0x44b0('0x5'));var rimraf=require(_0x44b0('0x6'));var config=require(_0x44b0('0x7'));var attributes=require(_0x44b0('0x8'));module['exports']=function(_0x1fc52a,_0x437519){return _0x1fc52a['define']('ChatMessage',attributes,{'tableName':_0x44b0('0x9'),'paranoid':![],'indexes':[{'name':_0x44b0('0xa'),'fields':[_0x44b0('0xb')],'type':_0x44b0('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x36ebcb,_0x4d4168,_0x46adf0){var _0x464b65=_0x1fc52a[_0x44b0('0xd')];var _0x39b170=_0x36ebcb[_0x44b0('0xe')]({'plain':!![]});if(_0x39b170[_0x44b0('0xf')][_0x44b0('0x10')]()==='in'||_0x39b170[_0x44b0('0xf')]['toLowerCase']()===_0x44b0('0x11')&&!_0x39b170[_0x44b0('0x12')]&&!_[_0x44b0('0x13')](_0x39b170[_0x44b0('0x14')])){_0x464b65[_0x44b0('0x15')][_0x44b0('0x16')]({'where':{'id':_0x39b170[_0x44b0('0x17')]}})[_0x44b0('0x18')](function(_0x3fd976){if(_0x3fd976){_0x3fd976[_0x44b0('0x19')]({'lastMsgAt':_0x39b170[_0x44b0('0x1a')],'lastMsgDirection':_0x39b170['direction']['toLowerCase']()});}})[_0x44b0('0x1b')](function(_0x5eece6){console[_0x44b0('0x1c')](_0x5eece6);});}_0x46adf0();}},'charset':_0x44b0('0x1d'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file