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 _0x8d50=['setMaxListeners','save','update','remove','emit','hook','exports','events','FaxMessage'];(function(_0x15ae63,_0xa79ca4){var _0x1ba0a1=function(_0x2406b2){while(--_0x2406b2){_0x15ae63['push'](_0x15ae63['shift']());}};_0x1ba0a1(++_0xa79ca4);}(_0x8d50,0xbb));var _0x08d5=function(_0x1b5b92,_0x24fa25){_0x1b5b92=_0x1b5b92-0x0;var _0x19c290=_0x8d50[_0x1b5b92];return _0x19c290;};'use strict';var EventEmitter=require(_0x08d5('0x0'));var FaxMessage=require('../../mysqldb')['db'][_0x08d5('0x1')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x08d5('0x2')](0x0);var events={'afterCreate':_0x08d5('0x3'),'afterUpdate':_0x08d5('0x4'),'afterDestroy':_0x08d5('0x5')};function emitEvent(_0xc5c13e){return function(_0x3a8790,_0x33e77a,_0x39f278){FaxMessageEvents[_0x08d5('0x6')](_0xc5c13e+':'+_0x3a8790['id'],_0x3a8790);FaxMessageEvents[_0x08d5('0x6')](_0xc5c13e,_0x3a8790);_0x39f278(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxMessage[_0x08d5('0x7')](e,emitEvent(event));}}module[_0x08d5('0x8')]=FaxMessageEvents;