Built motion from commit (unavailable).|2.5.8
[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 _0x5af6=['exports','events','../../mysqldb','FaxQueue','save','emit'];(function(_0x4e0651,_0x20c984){var _0x241037=function(_0x497ac4){while(--_0x497ac4){_0x4e0651['push'](_0x4e0651['shift']());}};_0x241037(++_0x20c984);}(_0x5af6,0x121));var _0x65af=function(_0x307457,_0xb6be2d){_0x307457=_0x307457-0x0;var _0x364f23=_0x5af6[_0x307457];return _0x364f23;};'use strict';var EventEmitter=require(_0x65af('0x0'));var FaxQueue=require(_0x65af('0x1'))['db'][_0x65af('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x65af('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x5a6bc9){return function(_0xaa3c5e,_0x931885,_0x1c7477){FaxQueueEvents[_0x65af('0x4')](_0x5a6bc9+':'+_0xaa3c5e['id'],_0xaa3c5e);FaxQueueEvents[_0x65af('0x4')](_0x5a6bc9,_0xaa3c5e);_0x1c7477(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0x65af('0x5')]=FaxQueueEvents;