Built motion from commit (unavailable).|2.5.14
[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 _0xfac7=['emit','events','../../mysqldb','VoiceExtension','setMaxListeners','update'];(function(_0xa1dc15,_0x2f3c63){var _0x2c4d39=function(_0x195277){while(--_0x195277){_0xa1dc15['push'](_0xa1dc15['shift']());}};_0x2c4d39(++_0x2f3c63);}(_0xfac7,0x1c9));var _0x7fac=function(_0x163cd0,_0x461c03){_0x163cd0=_0x163cd0-0x0;var _0x166213=_0xfac7[_0x163cd0];return _0x166213;};'use strict';var EventEmitter=require(_0x7fac('0x0'));var VoiceExtension=require(_0x7fac('0x1'))['db'][_0x7fac('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x7fac('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x7fac('0x4'),'afterDestroy':'remove'};function emitEvent(_0x53fffa){return function(_0x177ba5,_0x586213,_0x15371a){VoiceExtensionEvents[_0x7fac('0x5')](_0x53fffa+':'+_0x177ba5['id'],_0x177ba5);VoiceExtensionEvents[_0x7fac('0x5')](_0x53fffa,_0x177ba5);_0x15371a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;