Built motion from commit (unavailable).|2.5.4
[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 _0xdc71=['exports','../../mysqldb','FaxQueue','setMaxListeners','save','update','remove','emit','hook'];(function(_0x39ccd2,_0x21d13f){var _0x705c8e=function(_0x28ba01){while(--_0x28ba01){_0x39ccd2['push'](_0x39ccd2['shift']());}};_0x705c8e(++_0x21d13f);}(_0xdc71,0xb5));var _0x1dc7=function(_0x4977e8,_0x33dead){_0x4977e8=_0x4977e8-0x0;var _0x4fdc8f=_0xdc71[_0x4977e8];return _0x4fdc8f;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0x1dc7('0x0'))['db'][_0x1dc7('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x1dc7('0x2')](0x0);var events={'afterCreate':_0x1dc7('0x3'),'afterUpdate':_0x1dc7('0x4'),'afterDestroy':_0x1dc7('0x5')};function emitEvent(_0x4f00cd){return function(_0x49b1bc,_0x31326c,_0xf388d2){FaxQueueEvents[_0x1dc7('0x6')](_0x4f00cd+':'+_0x49b1bc['id'],_0x49b1bc);FaxQueueEvents[_0x1dc7('0x6')](_0x4f00cd,_0x49b1bc);_0xf388d2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue[_0x1dc7('0x7')](e,emitEvent(event));}}module[_0x1dc7('0x8')]=FaxQueueEvents;