Built motion from commit (unavailable).|2.4.18
[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 _0x98e7=['exports','events','../../mysqldb','OpenchannelAccount','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x56f14f,_0x50460f){var _0x408256=function(_0xc333bb){while(--_0xc333bb){_0x56f14f['push'](_0x56f14f['shift']());}};_0x408256(++_0x50460f);}(_0x98e7,0x14b));var _0x798e=function(_0x4ff7d1,_0x3331d1){_0x4ff7d1=_0x4ff7d1-0x0;var _0x16e063=_0x98e7[_0x4ff7d1];return _0x16e063;};'use strict';var EventEmitter=require(_0x798e('0x0'));var OpenchannelAccount=require(_0x798e('0x1'))['db'][_0x798e('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x798e('0x3')](0x0);var events={'afterCreate':_0x798e('0x4'),'afterUpdate':_0x798e('0x5'),'afterDestroy':_0x798e('0x6')};function emitEvent(_0x3cfe53){return function(_0xde751c,_0x5e5965,_0x390618){OpenchannelAccountEvents[_0x798e('0x7')](_0x3cfe53+':'+_0xde751c['id'],_0xde751c);OpenchannelAccountEvents[_0x798e('0x7')](_0x3cfe53,_0xde751c);_0x390618(null);};}for(var e in events){if(events[_0x798e('0x8')](e)){var event=events[e];OpenchannelAccount['hook'](e,emitEvent(event));}}module[_0x798e('0x9')]=OpenchannelAccountEvents;