Built motion from commit (unavailable).|2.4.19
[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 _0x3f40=['SmsQueue','save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x24085e,_0x5b8122){var _0x5e3a7f=function(_0x498f24){while(--_0x498f24){_0x24085e['push'](_0x24085e['shift']());}};_0x5e3a7f(++_0x5b8122);}(_0x3f40,0xbb));var _0x03f4=function(_0x3c98dc,_0x2cdc38){_0x3c98dc=_0x3c98dc-0x0;var _0x53436b=_0x3f40[_0x3c98dc];return _0x53436b;};'use strict';var EventEmitter=require(_0x03f4('0x0'));var SmsQueue=require(_0x03f4('0x1'))['db'][_0x03f4('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x03f4('0x3'),'afterUpdate':'update','afterDestroy':_0x03f4('0x4')};function emitEvent(_0x29fa2c){return function(_0x3e2fdf,_0x2597fd,_0x53e1db){SmsQueueEvents[_0x03f4('0x5')](_0x29fa2c+':'+_0x3e2fdf['id'],_0x3e2fdf);SmsQueueEvents[_0x03f4('0x5')](_0x29fa2c,_0x3e2fdf);_0x53e1db(null);};}for(var e in events){if(events[_0x03f4('0x6')](e)){var event=events[e];SmsQueue[_0x03f4('0x7')](e,emitEvent(event));}}module[_0x03f4('0x8')]=SmsQueueEvents;