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 _0x84c6=['setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','FaxMessage'];(function(_0x2fb4ee,_0x4db18a){var _0xeb370f=function(_0x5dace1){while(--_0x5dace1){_0x2fb4ee['push'](_0x2fb4ee['shift']());}};_0xeb370f(++_0x4db18a);}(_0x84c6,0xe7));var _0x684c=function(_0x236ccb,_0x105349){_0x236ccb=_0x236ccb-0x0;var _0x4d8b67=_0x84c6[_0x236ccb];return _0x4d8b67;};'use strict';var EventEmitter=require('events');var FaxMessage=require('../../mysqldb')['db'][_0x684c('0x0')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x684c('0x1')](0x0);var events={'afterCreate':_0x684c('0x2'),'afterUpdate':'update','afterDestroy':_0x684c('0x3')};function emitEvent(_0x4e2f8c){return function(_0x3930c5,_0x40cc4c,_0x3baab2){FaxMessageEvents[_0x684c('0x4')](_0x4e2f8c+':'+_0x3930c5['id'],_0x3930c5);FaxMessageEvents[_0x684c('0x4')](_0x4e2f8c,_0x3930c5);_0x3baab2(null);};}for(var e in events){if(events[_0x684c('0x5')](e)){var event=events[e];FaxMessage[_0x684c('0x6')](e,emitEvent(event));}}module[_0x684c('0x7')]=FaxMessageEvents;