Built motion from commit 092f8824.|2.5.49
[motion2.git] / server / api / userNotification / userNotification.events.js
index 06cc70f..cd694bf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c53=['emit','hook','exports','userNotification','save','update'];(function(_0x580b01,_0x2c3619){var _0x19f193=function(_0x3dffbc){while(--_0x3dffbc){_0x580b01['push'](_0x580b01['shift']());}};_0x19f193(++_0x2c3619);}(_0x7c53,0xf9));var _0x37c5=function(_0x21b3fc,_0x4a5812){_0x21b3fc=_0x21b3fc-0x0;var _0x47adba=_0x7c53[_0x21b3fc];return _0x47adba;};'use strict';var EventEmitter=require('events');var userNotification=require('../../mysqldb')['db'][_0x37c5('0x0')];var userNotificationEvents=new EventEmitter();userNotificationEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x37c5('0x1'),'afterUpdate':_0x37c5('0x2'),'afterDestroy':'remove'};function emitEvent(_0x5e35ff){return function(_0x36500b,_0x1651ba,_0x4831b2){userNotificationEvents[_0x37c5('0x3')](_0x5e35ff+':'+_0x36500b['id'],_0x36500b);userNotificationEvents[_0x37c5('0x3')](_0x5e35ff,_0x36500b);_0x4831b2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];userNotification[_0x37c5('0x4')](e,emitEvent(event));}}module[_0x37c5('0x5')]=userNotificationEvents;
\ No newline at end of file
+var _0xa073=['exports','events','../../mysqldb','UserNotification','setMaxListeners','save','remove','emit','hasOwnProperty','hook'];(function(_0x375ccf,_0x14964c){var _0x1507e8=function(_0x482e1e){while(--_0x482e1e){_0x375ccf['push'](_0x375ccf['shift']());}};_0x1507e8(++_0x14964c);}(_0xa073,0x97));var _0x3a07=function(_0x5bbca6,_0x126ac9){_0x5bbca6=_0x5bbca6-0x0;var _0x469ab3=_0xa073[_0x5bbca6];return _0x469ab3;};'use strict';var EventEmitter=require(_0x3a07('0x0'));var UserNotification=require(_0x3a07('0x1'))['db'][_0x3a07('0x2')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents[_0x3a07('0x3')](0x0);var events={'afterCreate':_0x3a07('0x4'),'afterUpdate':'update','afterDestroy':_0x3a07('0x5')};function emitEvent(_0x2593e3){return function(_0x910120,_0x43eafa,_0x8cf24a){UserNotificationEvents[_0x3a07('0x6')](_0x2593e3+':'+_0x910120['id'],_0x910120);UserNotificationEvents['emit'](_0x2593e3,_0x910120);_0x8cf24a(null);};}for(var e in events){if(events[_0x3a07('0x7')](e)){var event=events[e];UserNotification[_0x3a07('0x8')](e,emitEvent(event));}}module[_0x3a07('0x9')]=UserNotificationEvents;
\ No newline at end of file