Built motion from commit (unavailable).|2.4.21
[motion2.git] / server / api / voiceExtension / voiceExtension.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x2932=['VoiceExtension','emit','hasOwnProperty','hook','exports','events'];(function(_0x549b29,_0x2e2b00){var _0x2b813f=function(_0x43234f){while(--_0x43234f){_0x549b29['push'](_0x549b29['shift']());}};_0x2b813f(++_0x2e2b00);}(_0x2932,0xa7));var _0x2293=function(_0x25e7cb,_0x3579b7){_0x25e7cb=_0x25e7cb-0x0;var _0x375d92=_0x2932[_0x25e7cb];return _0x375d92;};'use strict';var EventEmitter=require(_0x2293('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x2293('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x497c27){return function(_0x349b22,_0x81282f,_0x41d27b){VoiceExtensionEvents[_0x2293('0x2')](_0x497c27+':'+_0x349b22['id'],_0x349b22);VoiceExtensionEvents[_0x2293('0x2')](_0x497c27,_0x349b22);_0x41d27b(null);};}for(var e in events){if(events[_0x2293('0x3')](e)){var event=events[e];VoiceExtension[_0x2293('0x4')](e,emitEvent(event));}}module[_0x2293('0x5')]=VoiceExtensionEvents;