Built motion from commit (unavailable).|2.5.21
[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 _0x9364=['hook','exports','events','../../mysqldb','OpenchannelAccount','update','remove','emit'];(function(_0x28e33,_0x40f3ae){var _0x1b8eca=function(_0x2dce89){while(--_0x2dce89){_0x28e33['push'](_0x28e33['shift']());}};_0x1b8eca(++_0x40f3ae);}(_0x9364,0xca));var _0x4936=function(_0x383dc6,_0x335b3c){_0x383dc6=_0x383dc6-0x0;var _0x4fdd3e=_0x9364[_0x383dc6];return _0x4fdd3e;};'use strict';var EventEmitter=require(_0x4936('0x0'));var OpenchannelAccount=require(_0x4936('0x1'))['db'][_0x4936('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x4936('0x3'),'afterDestroy':_0x4936('0x4')};function emitEvent(_0x40ebb3){return function(_0x46a776,_0x4c2765,_0x333c83){OpenchannelAccountEvents['emit'](_0x40ebb3+':'+_0x46a776['id'],_0x46a776);OpenchannelAccountEvents[_0x4936('0x5')](_0x40ebb3,_0x46a776);_0x333c83(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelAccount[_0x4936('0x6')](e,emitEvent(event));}}module[_0x4936('0x7')]=OpenchannelAccountEvents;