Built motion from commit (unavailable).|2.5.3
[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 _0xeb6c=['../../mysqldb','setMaxListeners','save','update','emit','hasOwnProperty','exports'];(function(_0x5040b0,_0x53c900){var _0x32d66e=function(_0x10451b){while(--_0x10451b){_0x5040b0['push'](_0x5040b0['shift']());}};_0x32d66e(++_0x53c900);}(_0xeb6c,0x1ea));var _0xceb6=function(_0x48a0fe,_0x9e5487){_0x48a0fe=_0x48a0fe-0x0;var _0x45aa49=_0xeb6c[_0x48a0fe];return _0x45aa49;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0xceb6('0x0'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xceb6('0x1')](0x0);var events={'afterCreate':_0xceb6('0x2'),'afterUpdate':_0xceb6('0x3'),'afterDestroy':'remove'};function emitEvent(_0x2140ca){return function(_0x343364,_0x3e51f5,_0x501167){FaxQueueEvents[_0xceb6('0x4')](_0x2140ca+':'+_0x343364['id'],_0x343364);FaxQueueEvents[_0xceb6('0x4')](_0x2140ca,_0x343364);_0x501167(null);};}for(var e in events){if(events[_0xceb6('0x5')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xceb6('0x6')]=FaxQueueEvents;