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 _0x5707=['hasOwnProperty','events','VoiceExtension','setMaxListeners','save','update','remove','emit'];(function(_0x56b389,_0x56a28f){var _0x7cc435=function(_0x3ad2ce){while(--_0x3ad2ce){_0x56b389['push'](_0x56b389['shift']());}};_0x7cc435(++_0x56a28f);}(_0x5707,0x1b9));var _0x7570=function(_0x3df871,_0xda2e11){_0x3df871=_0x3df871-0x0;var _0x570f7b=_0x5707[_0x3df871];return _0x570f7b;};'use strict';var EventEmitter=require(_0x7570('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x7570('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x7570('0x2')](0x0);var events={'afterCreate':_0x7570('0x3'),'afterUpdate':_0x7570('0x4'),'afterDestroy':_0x7570('0x5')};function emitEvent(_0xe374e5){return function(_0x5209f0,_0x2d60f2,_0x2814ca){VoiceExtensionEvents[_0x7570('0x6')](_0xe374e5+':'+_0x5209f0['id'],_0x5209f0);VoiceExtensionEvents[_0x7570('0x6')](_0xe374e5,_0x5209f0);_0x2814ca(null);};}for(var e in events){if(events[_0x7570('0x7')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;