Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / faxInteraction / faxInteraction.events.js
index 36359d0..5d5b94a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x535b=['length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','FaxInteraction','FaxMessage','save','update','remove','getUsers','then','setDataValue','Users','map','findAll','unreadMessages'];(function(_0x58ee7f,_0x1728ae){var _0x25ac11=function(_0x2eaf7a){while(--_0x2eaf7a){_0x58ee7f['push'](_0x58ee7f['shift']());}};_0x25ac11(++_0x1728ae);}(_0x535b,0x1aa));var _0xb535=function(_0x34d69d,_0x4506e9){_0x34d69d=_0x34d69d-0x0;var _0x2d0931=_0x535b[_0x34d69d];return _0x2d0931;};'use strict';var EventEmitter=require(_0xb535('0x0'));var FaxInteraction=require(_0xb535('0x1'))['db'][_0xb535('0x2')];var FaxMessage=require(_0xb535('0x1'))['db'][_0xb535('0x3')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb535('0x4'),'afterUpdate':_0xb535('0x5'),'afterDestroy':_0xb535('0x6')};function emitEvent(_0x345f77){return function(_0x49177e,_0x5b22d4,_0x5c3c87){_0x49177e[_0xb535('0x7')]({'attributes':['id'],'raw':!![]})[_0xb535('0x8')](function(_0x5c56cf){_0x49177e[_0xb535('0x9')](_0xb535('0xa'),_0x5c56cf[_0xb535('0xb')](function(_0x9a189c){return{'id':_0x9a189c['id']};}));return FaxMessage[_0xb535('0xc')]({'where':{'FaxInteractionId':_0x49177e['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x254c10){_0x49177e[_0xb535('0x9')](_0xb535('0xd'),_0x254c10[_0xb535('0xe')]);FaxInteractionEvents[_0xb535('0xf')](_0x345f77+':'+_0x49177e['id'],_0x49177e);FaxInteractionEvents[_0xb535('0xf')](_0x345f77,_0x49177e);_0x5c3c87(null);})[_0xb535('0x10')](_0x5c3c87(null));};}for(var e in events){if(events[_0xb535('0x11')](e)){var event=events[e];FaxInteraction[_0xb535('0x12')](e,emitEvent(event));}}module[_0xb535('0x13')]=FaxInteractionEvents;
\ No newline at end of file
+var _0x3dc4=['setDataValue','Users','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','FaxInteraction','FaxMessage','save','remove','getUsers','then'];(function(_0x47f653,_0x34342a){var _0xc1d822=function(_0x3f4005){while(--_0x3f4005){_0x47f653['push'](_0x47f653['shift']());}};_0xc1d822(++_0x34342a);}(_0x3dc4,0x1d3));var _0x43dc=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3dc4[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x43dc('0x0'));var FaxInteraction=require(_0x43dc('0x1'))['db'][_0x43dc('0x2')];var FaxMessage=require(_0x43dc('0x1'))['db'][_0x43dc('0x3')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x43dc('0x4'),'afterUpdate':'update','afterDestroy':_0x43dc('0x5')};function emitEvent(_0x57f9d0){return function(_0x5ccebb,_0x4a443b,_0x420173){_0x5ccebb[_0x43dc('0x6')]({'attributes':['id'],'raw':!![]})[_0x43dc('0x7')](function(_0x1df06b){_0x5ccebb[_0x43dc('0x8')](_0x43dc('0x9'),_0x1df06b[_0x43dc('0xa')](function(_0x34cf4e){return{'id':_0x34cf4e['id']};}));return FaxMessage[_0x43dc('0xb')]({'where':{'FaxInteractionId':_0x5ccebb['id'],'direction':'in','read':![]},'raw':!![]});})[_0x43dc('0x7')](function(_0x59bcb9){_0x5ccebb[_0x43dc('0x8')](_0x43dc('0xc'),_0x59bcb9[_0x43dc('0xd')]);FaxInteractionEvents[_0x43dc('0xe')](_0x57f9d0+':'+_0x5ccebb['id'],_0x5ccebb);FaxInteractionEvents[_0x43dc('0xe')](_0x57f9d0,_0x5ccebb);_0x420173(null);})[_0x43dc('0xf')](_0x420173(null));};}for(var e in events){if(events[_0x43dc('0x10')](e)){var event=events[e];FaxInteraction[_0x43dc('0x11')](e,emitEvent(event));}}module[_0x43dc('0x12')]=FaxInteractionEvents;
\ No newline at end of file