1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xc373=['../../mysqldb','FaxMessage','setMaxListeners','remove','emit','hook','exports'];(function(_0xe353ce,_0x3e0a84){var _0x208296=function(_0x2b63cb){while(--_0x2b63cb){_0xe353ce['push'](_0xe353ce['shift']());}};_0x208296(++_0x3e0a84);}(_0xc373,0x1c7));var _0x3c37=function(_0x1fd9e7,_0x24cdbe){_0x1fd9e7=_0x1fd9e7-0x0;var _0x1781f2=_0xc373[_0x1fd9e7];return _0x1781f2;};'use strict';var EventEmitter=require('events');var FaxMessage=require(_0x3c37('0x0'))['db'][_0x3c37('0x1')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x3c37('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x3c37('0x3')};function emitEvent(_0x138f81){return function(_0x38d2d3,_0x2ca426,_0x1417ac){FaxMessageEvents[_0x3c37('0x4')](_0x138f81+':'+_0x38d2d3['id'],_0x38d2d3);FaxMessageEvents['emit'](_0x138f81,_0x38d2d3);_0x1417ac(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxMessage[_0x3c37('0x5')](e,emitEvent(event));}}module[_0x3c37('0x6')]=FaxMessageEvents;