Built motion from commit (unavailable).|2.0.82
[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 _0xd294=['SmsQueue','setMaxListeners','remove','emit','hook','exports'];(function(_0x440ef6,_0x266ca0){var _0x3453fa=function(_0x4e1ed4){while(--_0x4e1ed4){_0x440ef6['push'](_0x440ef6['shift']());}};_0x3453fa(++_0x266ca0);}(_0xd294,0xae));var _0x4d29=function(_0xf9c9ec,_0x4ac1bf){_0xf9c9ec=_0xf9c9ec-0x0;var _0x1d9352=_0xd294[_0xf9c9ec];return _0x1d9352;};'use strict';var EventEmitter=require('events');var SmsQueue=require('../../mysqldb')['db'][_0x4d29('0x0')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x4d29('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x4d29('0x2')};function emitEvent(_0x1e3d4e){return function(_0x3bc104,_0x3785de,_0x10482f){SmsQueueEvents[_0x4d29('0x3')](_0x1e3d4e+':'+_0x3bc104['id'],_0x3bc104);SmsQueueEvents[_0x4d29('0x3')](_0x1e3d4e,_0x3bc104);_0x10482f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsQueue[_0x4d29('0x4')](e,emitEvent(event));}}module[_0x4d29('0x5')]=SmsQueueEvents;