Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / faxMessage / faxMessage.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 _0xa647=['../../mysqldb','FaxMessage','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events'];(function(_0x342359,_0x159fcc){var _0x22d408=function(_0x2bddb6){while(--_0x2bddb6){_0x342359['push'](_0x342359['shift']());}};_0x22d408(++_0x159fcc);}(_0xa647,0x81));var _0x7a64=function(_0x304353,_0x7bd7b3){_0x304353=_0x304353-0x0;var _0x11365b=_0xa647[_0x304353];return _0x11365b;};'use strict';var EventEmitter=require(_0x7a64('0x0'));var FaxMessage=require(_0x7a64('0x1'))['db'][_0x7a64('0x2')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x7a64('0x3')](0x0);var events={'afterCreate':_0x7a64('0x4'),'afterUpdate':_0x7a64('0x5'),'afterDestroy':_0x7a64('0x6')};function emitEvent(_0x30b8b7){return function(_0x1c7a04,_0x2e1029,_0x46b8b0){FaxMessageEvents[_0x7a64('0x7')](_0x30b8b7+':'+_0x1c7a04['id'],_0x1c7a04);FaxMessageEvents['emit'](_0x30b8b7,_0x1c7a04);_0x46b8b0(null);};}for(var e in events){if(events[_0x7a64('0x8')](e)){var event=events[e];FaxMessage[_0x7a64('0x9')](e,emitEvent(event));}}module['exports']=FaxMessageEvents;