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 _0x7e53=['remove','emit','hasOwnProperty','hook','events','../../mysqldb','SmsQueue','setMaxListeners','save','update'];(function(_0x1c9559,_0x39f49e){var _0x63354b=function(_0x5d9a0c){while(--_0x5d9a0c){_0x1c9559['push'](_0x1c9559['shift']());}};_0x63354b(++_0x39f49e);}(_0x7e53,0x144));var _0x37e5=function(_0x483a2a,_0x406707){_0x483a2a=_0x483a2a-0x0;var _0xd68be3=_0x7e53[_0x483a2a];return _0xd68be3;};'use strict';var EventEmitter=require(_0x37e5('0x0'));var SmsQueue=require(_0x37e5('0x1'))['db'][_0x37e5('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x37e5('0x3')](0x0);var events={'afterCreate':_0x37e5('0x4'),'afterUpdate':_0x37e5('0x5'),'afterDestroy':_0x37e5('0x6')};function emitEvent(_0x15c610){return function(_0x2bb717,_0x599948,_0xf5ca09){SmsQueueEvents[_0x37e5('0x7')](_0x15c610+':'+_0x2bb717['id'],_0x2bb717);SmsQueueEvents[_0x37e5('0x7')](_0x15c610,_0x2bb717);_0xf5ca09(null);};}for(var e in events){if(events[_0x37e5('0x8')](e)){var event=events[e];SmsQueue[_0x37e5('0x9')](e,emitEvent(event));}}module['exports']=SmsQueueEvents;