Built motion from commit (unavailable).|2.5.31
[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 _0xaba9=['save','update','emit','hasOwnProperty','events','../../mysqldb','OpenchannelAccount','setMaxListeners'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0xaba9,0x14c));var _0x9aba=function(_0x20cea3,_0x27ea73){_0x20cea3=_0x20cea3-0x0;var _0x4337ad=_0xaba9[_0x20cea3];return _0x4337ad;};'use strict';var EventEmitter=require(_0x9aba('0x0'));var OpenchannelAccount=require(_0x9aba('0x1'))['db'][_0x9aba('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x9aba('0x3')](0x0);var events={'afterCreate':_0x9aba('0x4'),'afterUpdate':_0x9aba('0x5'),'afterDestroy':'remove'};function emitEvent(_0xc1d487){return function(_0x307db0,_0x2d3442,_0x54da7c){OpenchannelAccountEvents[_0x9aba('0x6')](_0xc1d487+':'+_0x307db0['id'],_0x307db0);OpenchannelAccountEvents[_0x9aba('0x6')](_0xc1d487,_0x307db0);_0x54da7c(null);};}for(var e in events){if(events[_0x9aba('0x7')](e)){var event=events[e];OpenchannelAccount['hook'](e,emitEvent(event));}}module['exports']=OpenchannelAccountEvents;