Built motion from commit 97153652.|2.6.26
[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 _0xa9e0=['hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelAccount','update','emit'];(function(_0x5a1a51,_0x144c79){var _0x47edd7=function(_0x2259bb){while(--_0x2259bb){_0x5a1a51['push'](_0x5a1a51['shift']());}};_0x47edd7(++_0x144c79);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0xa9e0[_0x34bf97];return _0x292719;};'use strict';var EventEmitter=require(_0x0a9e('0x0'));var OpenchannelAccount=require(_0x0a9e('0x1'))['db'][_0x0a9e('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x0a9e('0x3'),'afterDestroy':'remove'};function emitEvent(_0x333808){return function(_0x432180,_0x2ab90b,_0x991246){OpenchannelAccountEvents[_0x0a9e('0x4')](_0x333808+':'+_0x432180['id'],_0x432180);OpenchannelAccountEvents['emit'](_0x333808,_0x432180);_0x991246(null);};}for(var e in events){if(events[_0x0a9e('0x5')](e)){var event=events[e];OpenchannelAccount[_0x0a9e('0x6')](e,emitEvent(event));}}module[_0x0a9e('0x7')]=OpenchannelAccountEvents;