Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / faxMessage / faxMessage.model.js
index 3af564e..8531741 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x38dc=['secret','isNil','UserId','FaxInteractionId','then','update','createdAt','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','rimraf','../../config/environment','./faxMessage.attributes','fax_messages','fti_fax_messages','body','FULLTEXT','models','get','direction','toLowerCase','out'];(function(_0x5013bd,_0x4d4b8d){var _0x5d3e13=function(_0x3dd8a0){while(--_0x3dd8a0){_0x5013bd['push'](_0x5013bd['shift']());}};_0x5d3e13(++_0x4d4b8d);}(_0x38dc,0x91));var _0xc38d=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x38dc[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0xc38d('0x0'));var util=require(_0xc38d('0x1'));var logger=require(_0xc38d('0x2'))(_0xc38d('0x3'));var moment=require(_0xc38d('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xc38d('0x5'));var config=require(_0xc38d('0x6'));var attributes=require(_0xc38d('0x7'));module['exports']=function(_0x21c10a,_0x453281){return _0x21c10a['define']('FaxMessage',attributes,{'tableName':_0xc38d('0x8'),'paranoid':![],'indexes':[{'name':_0xc38d('0x9'),'fields':[_0xc38d('0xa')],'type':_0xc38d('0xb')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1d06c8,_0x375696,_0x5a8a4c){var _0x1a1c95=_0x21c10a[_0xc38d('0xc')];var _0x13dfc7=_0x1d06c8[_0xc38d('0xd')]({'plain':!![]});if(_0x13dfc7[_0xc38d('0xe')][_0xc38d('0xf')]()==='in'||_0x13dfc7[_0xc38d('0xe')][_0xc38d('0xf')]()===_0xc38d('0x10')&&!_0x13dfc7[_0xc38d('0x11')]&&!_[_0xc38d('0x12')](_0x13dfc7[_0xc38d('0x13')])){_0x1a1c95['FaxInteraction']['findOne']({'where':{'id':_0x13dfc7[_0xc38d('0x14')]}})[_0xc38d('0x15')](function(_0x172817){if(_0x172817){_0x172817[_0xc38d('0x16')]({'lastMsgAt':_0x13dfc7[_0xc38d('0x17')],'lastMsgDirection':_0x13dfc7['direction'][_0xc38d('0xf')]()});}})[_0xc38d('0x18')](function(_0xf92f1f){console['error'](_0xf92f1f);});}_0x5a8a4c();}},'charset':_0xc38d('0x19'),'collate':_0xc38d('0x1a')});};
\ No newline at end of file
+var _0xf772=['direction','toLowerCase','out','secret','FaxInteraction','findOne','FaxInteractionId','update','createdAt','catch','utf8mb4','lodash','util','api','request-promise','path','../../config/environment','./faxMessage.attributes','exports','define','fax_messages','fti_fax_messages','body','FULLTEXT','models','get'];(function(_0x28ffee,_0x230a50){var _0x2b4cf1=function(_0x2be533){while(--_0x2be533){_0x28ffee['push'](_0x28ffee['shift']());}};_0x2b4cf1(++_0x230a50);}(_0xf772,0x143));var _0x2f77=function(_0xebc6bf,_0x457124){_0xebc6bf=_0xebc6bf-0x0;var _0x3cc4a5=_0xf772[_0xebc6bf];return _0x3cc4a5;};'use strict';var _=require(_0x2f77('0x0'));var util=require(_0x2f77('0x1'));var logger=require('../../config/logger')(_0x2f77('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2f77('0x3'));var fs=require('fs');var path=require(_0x2f77('0x4'));var rimraf=require('rimraf');var config=require(_0x2f77('0x5'));var attributes=require(_0x2f77('0x6'));module[_0x2f77('0x7')]=function(_0x2149c1,_0x1d5c23){return _0x2149c1[_0x2f77('0x8')]('FaxMessage',attributes,{'tableName':_0x2f77('0x9'),'paranoid':![],'indexes':[{'name':_0x2f77('0xa'),'fields':[_0x2f77('0xb')],'type':_0x2f77('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1a24bc,_0x4b11ec,_0x2bb6ea){var _0x202b69=_0x2149c1[_0x2f77('0xd')];var _0x46e56b=_0x1a24bc[_0x2f77('0xe')]({'plain':!![]});if(_0x46e56b[_0x2f77('0xf')][_0x2f77('0x10')]()==='in'||_0x46e56b['direction'][_0x2f77('0x10')]()===_0x2f77('0x11')&&!_0x46e56b[_0x2f77('0x12')]&&!_['isNil'](_0x46e56b['UserId'])){_0x202b69[_0x2f77('0x13')][_0x2f77('0x14')]({'where':{'id':_0x46e56b[_0x2f77('0x15')]}})['then'](function(_0x533076){if(_0x533076){_0x533076[_0x2f77('0x16')]({'lastMsgAt':_0x46e56b[_0x2f77('0x17')],'lastMsgDirection':_0x46e56b[_0x2f77('0xf')][_0x2f77('0x10')]()});}})[_0x2f77('0x18')](function(_0x1b51cb){console['error'](_0x1b51cb);});}_0x2bb6ea();}},'charset':_0x2f77('0x19'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file