Built motion from commit (unavailable).|2.5.14
[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 _0x142b=['events','../../mysqldb','SmsQueue','setMaxListeners','save','remove'];(function(_0x3d51e2,_0x15bca8){var _0x449f0c=function(_0x1feb6a){while(--_0x1feb6a){_0x3d51e2['push'](_0x3d51e2['shift']());}};_0x449f0c(++_0x15bca8);}(_0x142b,0x10e));var _0xb142=function(_0x1facf1,_0x382185){_0x1facf1=_0x1facf1-0x0;var _0x18a261=_0x142b[_0x1facf1];return _0x18a261;};'use strict';var EventEmitter=require(_0xb142('0x0'));var SmsQueue=require(_0xb142('0x1'))['db'][_0xb142('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xb142('0x3')](0x0);var events={'afterCreate':_0xb142('0x4'),'afterUpdate':'update','afterDestroy':_0xb142('0x5')};function emitEvent(_0x28ebb6){return function(_0x2b1cae,_0xb3dd9c,_0x5c3714){SmsQueueEvents['emit'](_0x28ebb6+':'+_0x2b1cae['id'],_0x2b1cae);SmsQueueEvents['emit'](_0x28ebb6,_0x2b1cae);_0x5c3714(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsQueue['hook'](e,emitEvent(event));}}module['exports']=SmsQueueEvents;