Built motion from commit (unavailable).|2.4.17
[motion2.git] / server / api / openchannelAccount / openchannelAccount.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 _0x1ec1=['OpenchannelAccount','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x1e7345,_0x18bcce){var _0x33017c=function(_0x2b274f){while(--_0x2b274f){_0x1e7345['push'](_0x1e7345['shift']());}};_0x33017c(++_0x18bcce);}(_0x1ec1,0xb3));var _0x11ec=function(_0x2402e6,_0x19c803){_0x2402e6=_0x2402e6-0x0;var _0x16e5b1=_0x1ec1[_0x2402e6];return _0x16e5b1;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require(_0x11ec('0x0'))['db'][_0x11ec('0x1')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x11ec('0x2')](0x0);var events={'afterCreate':_0x11ec('0x3'),'afterUpdate':_0x11ec('0x4'),'afterDestroy':_0x11ec('0x5')};function emitEvent(_0xe738d8){return function(_0x43cd4a,_0x47b4ec,_0x42be47){OpenchannelAccountEvents[_0x11ec('0x6')](_0xe738d8+':'+_0x43cd4a['id'],_0x43cd4a);OpenchannelAccountEvents[_0x11ec('0x6')](_0xe738d8,_0x43cd4a);_0x42be47(null);};}for(var e in events){if(events[_0x11ec('0x7')](e)){var event=events[e];OpenchannelAccount[_0x11ec('0x8')](e,emitEvent(event));}}module[_0x11ec('0x9')]=OpenchannelAccountEvents;