Built motion from commit (unavailable).|2.5.5
[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 _0x80f7=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelAccount','setMaxListeners','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x80f7,0x12f));var _0x780f=function(_0xbda849,_0x2dcb1a){_0xbda849=_0xbda849-0x0;var _0x2d3e9d=_0x80f7[_0xbda849];return _0x2d3e9d;};'use strict';var EventEmitter=require(_0x780f('0x0'));var OpenchannelAccount=require(_0x780f('0x1'))['db'][_0x780f('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x780f('0x3')](0x0);var events={'afterCreate':_0x780f('0x4'),'afterUpdate':_0x780f('0x5'),'afterDestroy':_0x780f('0x6')};function emitEvent(_0x16414c){return function(_0x18f145,_0xbe3d49,_0x117c04){OpenchannelAccountEvents[_0x780f('0x7')](_0x16414c+':'+_0x18f145['id'],_0x18f145);OpenchannelAccountEvents[_0x780f('0x7')](_0x16414c,_0x18f145);_0x117c04(null);};}for(var e in events){if(events[_0x780f('0x8')](e)){var event=events[e];OpenchannelAccount[_0x780f('0x9')](e,emitEvent(event));}}module[_0x780f('0xa')]=OpenchannelAccountEvents;