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 _0xf417=['FaxMessage','setMaxListeners','update','hasOwnProperty','exports','../../mysqldb'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0xf417,0x8f));var _0x7f41=function(_0x516ac4,_0x8b2375){_0x516ac4=_0x516ac4-0x0;var _0x35c675=_0xf417[_0x516ac4];return _0x35c675;};'use strict';var EventEmitter=require('events');var FaxMessage=require(_0x7f41('0x0'))['db'][_0x7f41('0x1')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x7f41('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x7f41('0x3'),'afterDestroy':'remove'};function emitEvent(_0x4c7081){return function(_0x2b7d4c,_0x5170ec,_0x51b0cb){FaxMessageEvents['emit'](_0x4c7081+':'+_0x2b7d4c['id'],_0x2b7d4c);FaxMessageEvents['emit'](_0x4c7081,_0x2b7d4c);_0x51b0cb(null);};}for(var e in events){if(events[_0x7f41('0x4')](e)){var event=events[e];FaxMessage['hook'](e,emitEvent(event));}}module[_0x7f41('0x5')]=FaxMessageEvents;