Built motion from commit (unavailable).|2.4.20
[motion2.git] / server / api / faxQueue / faxQueue.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 _0xd16b=['exports','events','../../mysqldb','FaxQueue','save','remove','emit','hook'];(function(_0x219792,_0x3dff32){var _0x314d01=function(_0x299503){while(--_0x299503){_0x219792['push'](_0x219792['shift']());}};_0x314d01(++_0x3dff32);}(_0xd16b,0xb1));var _0xbd16=function(_0x100a60,_0x476c55){_0x100a60=_0x100a60-0x0;var _0x537171=_0xd16b[_0x100a60];return _0x537171;};'use strict';var EventEmitter=require(_0xbd16('0x0'));var FaxQueue=require(_0xbd16('0x1'))['db'][_0xbd16('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xbd16('0x3'),'afterUpdate':'update','afterDestroy':_0xbd16('0x4')};function emitEvent(_0x12a3f3){return function(_0xbc5607,_0x3429c5,_0x70f8ed){FaxQueueEvents[_0xbd16('0x5')](_0x12a3f3+':'+_0xbc5607['id'],_0xbc5607);FaxQueueEvents[_0xbd16('0x5')](_0x12a3f3,_0xbc5607);_0x70f8ed(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue[_0xbd16('0x6')](e,emitEvent(event));}}module[_0xbd16('0x7')]=FaxQueueEvents;