1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0xa7c2=['save','update','remove','emit','hook','events','../../mysqldb','SmsMessage','setMaxListeners'];(function(_0x3110d7,_0x1a9b39){var _0x21c07a=function(_0x59d4f6){while(--_0x59d4f6){_0x3110d7['push'](_0x3110d7['shift']());}};_0x21c07a(++_0x1a9b39);}(_0xa7c2,0x17f));var _0x2a7c=function(_0x243b2f,_0x30aa15){_0x243b2f=_0x243b2f-0x0;var _0xcb3c2d=_0xa7c2[_0x243b2f];return _0xcb3c2d;};'use strict';var EventEmitter=require(_0x2a7c('0x0'));var SmsMessage=require(_0x2a7c('0x1'))['db'][_0x2a7c('0x2')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0x2a7c('0x3')](0x0);var events={'afterCreate':_0x2a7c('0x4'),'afterUpdate':_0x2a7c('0x5'),'afterDestroy':_0x2a7c('0x6')};function emitEvent(_0x1ec875){return function(_0x501f66,_0x5bbee,_0x1feec0){SmsMessageEvents[_0x2a7c('0x7')](_0x1ec875+':'+_0x501f66['id'],_0x501f66);SmsMessageEvents[_0x2a7c('0x7')](_0x1ec875,_0x501f66);_0x1feec0(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsMessage[_0x2a7c('0x8')](e,emitEvent(event));}}module['exports']=SmsMessageEvents;