Built motion from commit (unavailable).|2.5.23
[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 _0xfa91=['hasOwnProperty','hook','exports','../../mysqldb','setMaxListeners','update','remove','emit'];(function(_0x3fd74c,_0x3f781f){var _0x354d15=function(_0x22f76d){while(--_0x22f76d){_0x3fd74c['push'](_0x3fd74c['shift']());}};_0x354d15(++_0x3f781f);}(_0xfa91,0x11b));var _0x1fa9=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0xfa91[_0x167cc1];return _0x10bc4b;};'use strict';var EventEmitter=require('events');var SmsQueue=require(_0x1fa9('0x0'))['db']['SmsQueue'];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x1fa9('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1fa9('0x2'),'afterDestroy':_0x1fa9('0x3')};function emitEvent(_0x36a289){return function(_0x4a65c9,_0xc2cd7e,_0x5d3394){SmsQueueEvents[_0x1fa9('0x4')](_0x36a289+':'+_0x4a65c9['id'],_0x4a65c9);SmsQueueEvents[_0x1fa9('0x4')](_0x36a289,_0x4a65c9);_0x5d3394(null);};}for(var e in events){if(events[_0x1fa9('0x5')](e)){var event=events[e];SmsQueue[_0x1fa9('0x6')](e,emitEvent(event));}}module[_0x1fa9('0x7')]=SmsQueueEvents;