Built motion from commit (unavailable).|2.4.21
[motion2.git] / server / api / smsQueue / smsQueue.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xceef=['../../mysqldb','SmsQueue','setMaxListeners','save','update','remove','emit','hook','exports','events'];(function(_0x3fa914,_0x44eb50){var _0x51e6f3=function(_0x12df62){while(--_0x12df62){_0x3fa914['push'](_0x3fa914['shift']());}};_0x51e6f3(++_0x44eb50);}(_0xceef,0x13f));var _0xfcee=function(_0xba0c2,_0x54cc50){_0xba0c2=_0xba0c2-0x0;var _0x5a9fa0=_0xceef[_0xba0c2];return _0x5a9fa0;};'use strict';var EventEmitter=require(_0xfcee('0x0'));var SmsQueue=require(_0xfcee('0x1'))['db'][_0xfcee('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xfcee('0x3')](0x0);var events={'afterCreate':_0xfcee('0x4'),'afterUpdate':_0xfcee('0x5'),'afterDestroy':_0xfcee('0x6')};function emitEvent(_0x167431){return function(_0x1de7ac,_0x5dbf96,_0x376e67){SmsQueueEvents['emit'](_0x167431+':'+_0x1de7ac['id'],_0x1de7ac);SmsQueueEvents[_0xfcee('0x7')](_0x167431,_0x1de7ac);_0x376e67(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsQueue[_0xfcee('0x8')](e,emitEvent(event));}}module[_0xfcee('0x9')]=SmsQueueEvents;