Built motion from commit (unavailable).|2.5.9
[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 _0x0b8f=['setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelAccount'];(function(_0x5a11fe,_0x12877e){var _0x172dc6=function(_0x4b5ce6){while(--_0x4b5ce6){_0x5a11fe['push'](_0x5a11fe['shift']());}};_0x172dc6(++_0x12877e);}(_0x0b8f,0x1d3));var _0xf0b8=function(_0xbad60e,_0x21e634){_0xbad60e=_0xbad60e-0x0;var _0x3df1b9=_0x0b8f[_0xbad60e];return _0x3df1b9;};'use strict';var EventEmitter=require(_0xf0b8('0x0'));var OpenchannelAccount=require(_0xf0b8('0x1'))['db'][_0xf0b8('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0xf0b8('0x3')](0x0);var events={'afterCreate':_0xf0b8('0x4'),'afterUpdate':_0xf0b8('0x5'),'afterDestroy':'remove'};function emitEvent(_0x5768df){return function(_0x2c5146,_0x31c2a4,_0x9157af){OpenchannelAccountEvents[_0xf0b8('0x6')](_0x5768df+':'+_0x2c5146['id'],_0x2c5146);OpenchannelAccountEvents[_0xf0b8('0x6')](_0x5768df,_0x2c5146);_0x9157af(null);};}for(var e in events){if(events[_0xf0b8('0x7')](e)){var event=events[e];OpenchannelAccount[_0xf0b8('0x8')](e,emitEvent(event));}}module[_0xf0b8('0x9')]=OpenchannelAccountEvents;