Built motion from commit (unavailable).|2.4.20
[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 _0x781b=['VoiceExtension','setMaxListeners','save','update','emit','hook','exports','events','../../mysqldb'];(function(_0x476c7,_0x298ee0){var _0x47ae56=function(_0x4acf5a){while(--_0x4acf5a){_0x476c7['push'](_0x476c7['shift']());}};_0x47ae56(++_0x298ee0);}(_0x781b,0x1c9));var _0xb781=function(_0x376981,_0x4c338c){_0x376981=_0x376981-0x0;var _0x4ab265=_0x781b[_0x376981];return _0x4ab265;};'use strict';var EventEmitter=require(_0xb781('0x0'));var VoiceExtension=require(_0xb781('0x1'))['db'][_0xb781('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xb781('0x3')](0x0);var events={'afterCreate':_0xb781('0x4'),'afterUpdate':_0xb781('0x5'),'afterDestroy':'remove'};function emitEvent(_0x3f0e5e){return function(_0x295a86,_0xb799c7,_0x1be05d){VoiceExtensionEvents[_0xb781('0x6')](_0x3f0e5e+':'+_0x295a86['id'],_0x295a86);VoiceExtensionEvents['emit'](_0x3f0e5e,_0x295a86);_0x1be05d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0xb781('0x7')](e,emitEvent(event));}}module[_0xb781('0x8')]=VoiceExtensionEvents;