Built motion from commit 753c950e.|2.5.42
[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 _0x577c=['remove','emit','exports','events','../../mysqldb','FaxQueue','setMaxListeners','save','update'];(function(_0x2a67fe,_0x295c09){var _0x57e726=function(_0x280573){while(--_0x280573){_0x2a67fe['push'](_0x2a67fe['shift']());}};_0x57e726(++_0x295c09);}(_0x577c,0xe4));var _0xc577=function(_0x1eb1b2,_0x26b6b7){_0x1eb1b2=_0x1eb1b2-0x0;var _0x2f520a=_0x577c[_0x1eb1b2];return _0x2f520a;};'use strict';var EventEmitter=require(_0xc577('0x0'));var FaxQueue=require(_0xc577('0x1'))['db'][_0xc577('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xc577('0x3')](0x0);var events={'afterCreate':_0xc577('0x4'),'afterUpdate':_0xc577('0x5'),'afterDestroy':_0xc577('0x6')};function emitEvent(_0x3abf00){return function(_0x1d8227,_0x62cf1a,_0x53b354){FaxQueueEvents[_0xc577('0x7')](_0x3abf00+':'+_0x1d8227['id'],_0x1d8227);FaxQueueEvents['emit'](_0x3abf00,_0x1d8227);_0x53b354(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xc577('0x8')]=FaxQueueEvents;