Built motion from commit d1eab355.|2.6.28
[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 _0x22fb=['hook','exports','OpenchannelAccount','save','update','remove','emit','hasOwnProperty'];(function(_0x3747ae,_0x408e61){var _0x339035=function(_0x83be87){while(--_0x83be87){_0x3747ae['push'](_0x3747ae['shift']());}};_0x339035(++_0x408e61);}(_0x22fb,0x192));var _0xb22f=function(_0x1fd97d,_0x208af2){_0x1fd97d=_0x1fd97d-0x0;var _0x2fe848=_0x22fb[_0x1fd97d];return _0x2fe848;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require('../../mysqldb')['db'][_0xb22f('0x0')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb22f('0x1'),'afterUpdate':_0xb22f('0x2'),'afterDestroy':_0xb22f('0x3')};function emitEvent(_0x10d2c4){return function(_0x201512,_0x50cdab,_0x44717d){OpenchannelAccountEvents[_0xb22f('0x4')](_0x10d2c4+':'+_0x201512['id'],_0x201512);OpenchannelAccountEvents[_0xb22f('0x4')](_0x10d2c4,_0x201512);_0x44717d(null);};}for(var e in events){if(events[_0xb22f('0x5')](e)){var event=events[e];OpenchannelAccount[_0xb22f('0x6')](e,emitEvent(event));}}module[_0xb22f('0x7')]=OpenchannelAccountEvents;