Built motion from commit (unavailable).|2.5.15
[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 _0xbac4=['hook','exports','events','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0xf087cb,_0x4c0e2c){var _0x489575=function(_0x550f33){while(--_0x550f33){_0xf087cb['push'](_0xf087cb['shift']());}};_0x489575(++_0x4c0e2c);}(_0xbac4,0xad));var _0x4bac=function(_0x6d5912,_0x2c82ac){_0x6d5912=_0x6d5912-0x0;var _0x1fdff9=_0xbac4[_0x6d5912];return _0x1fdff9;};'use strict';var EventEmitter=require(_0x4bac('0x0'));var FaxQueue=require('../../mysqldb')['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x4bac('0x1')](0x0);var events={'afterCreate':_0x4bac('0x2'),'afterUpdate':_0x4bac('0x3'),'afterDestroy':_0x4bac('0x4')};function emitEvent(_0x321f08){return function(_0x26c973,_0x1f498c,_0x3be2ed){FaxQueueEvents[_0x4bac('0x5')](_0x321f08+':'+_0x26c973['id'],_0x26c973);FaxQueueEvents[_0x4bac('0x5')](_0x321f08,_0x26c973);_0x3be2ed(null);};}for(var e in events){if(events[_0x4bac('0x6')](e)){var event=events[e];FaxQueue[_0x4bac('0x7')](e,emitEvent(event));}}module[_0x4bac('0x8')]=FaxQueueEvents;