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 _0x6c99=['FaxMessage','emit','hasOwnProperty','hook','exports','events'];(function(_0x4ecae4,_0x6b1079){var _0x57a84e=function(_0x2c67f4){while(--_0x2c67f4){_0x4ecae4['push'](_0x4ecae4['shift']());}};_0x57a84e(++_0x6b1079);}(_0x6c99,0x9b));var _0x96c9=function(_0x2d8d69,_0x8e47ff){_0x2d8d69=_0x2d8d69-0x0;var _0x39ae22=_0x6c99[_0x2d8d69];return _0x39ae22;};'use strict';var EventEmitter=require(_0x96c9('0x0'));var FaxMessage=require('../../mysqldb')['db'][_0x96c9('0x1')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x4e4ce0){return function(_0x305437,_0x260379,_0x16f49a){FaxMessageEvents[_0x96c9('0x2')](_0x4e4ce0+':'+_0x305437['id'],_0x305437);FaxMessageEvents['emit'](_0x4e4ce0,_0x305437);_0x16f49a(null);};}for(var e in events){if(events[_0x96c9('0x3')](e)){var event=events[e];FaxMessage[_0x96c9('0x4')](e,emitEvent(event));}}module[_0x96c9('0x5')]=FaxMessageEvents;