Built motion from commit (unavailable).|2.4.17
[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 _0xa2a1=['hasOwnProperty','hook','exports','events','VoiceExtension','setMaxListeners','update','remove','emit'];(function(_0x4e989b,_0x56b5ec){var _0x2fa517=function(_0x13325d){while(--_0x13325d){_0x4e989b['push'](_0x4e989b['shift']());}};_0x2fa517(++_0x56b5ec);}(_0xa2a1,0xf6));var _0x1a2a=function(_0x88e615,_0x45f10f){_0x88e615=_0x88e615-0x0;var _0x1fec89=_0xa2a1[_0x88e615];return _0x1fec89;};'use strict';var EventEmitter=require(_0x1a2a('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x1a2a('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x1a2a('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1a2a('0x3'),'afterDestroy':_0x1a2a('0x4')};function emitEvent(_0x8bffee){return function(_0xd0b163,_0x39ca9b,_0x1e50c7){VoiceExtensionEvents[_0x1a2a('0x5')](_0x8bffee+':'+_0xd0b163['id'],_0xd0b163);VoiceExtensionEvents[_0x1a2a('0x5')](_0x8bffee,_0xd0b163);_0x1e50c7(null);};}for(var e in events){if(events[_0x1a2a('0x6')](e)){var event=events[e];VoiceExtension[_0x1a2a('0x7')](e,emitEvent(event));}}module[_0x1a2a('0x8')]=VoiceExtensionEvents;