1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x88ae=['save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','ChatGroup','setMaxListeners'];(function(_0x58b698,_0x4b2135){var _0x4f57c0=function(_0x337a36){while(--_0x337a36){_0x58b698['push'](_0x58b698['shift']());}};_0x4f57c0(++_0x4b2135);}(_0x88ae,0xd8));var _0xe88a=function(_0x457660,_0x47b54b){_0x457660=_0x457660-0x0;var _0x1b07ba=_0x88ae[_0x457660];return _0x1b07ba;};'use strict';var EventEmitter=require(_0xe88a('0x0'));var ChatGroup=require(_0xe88a('0x1'))['db'][_0xe88a('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0xe88a('0x3')](0x0);var events={'afterCreate':_0xe88a('0x4'),'afterUpdate':_0xe88a('0x5'),'afterDestroy':_0xe88a('0x6')};function emitEvent(_0x1719f8){return function(_0x507c70,_0x48687a,_0x3419a7){ChatGroupEvents[_0xe88a('0x7')](_0x1719f8+':'+_0x507c70['id'],_0x507c70);ChatGroupEvents[_0xe88a('0x7')](_0x1719f8,_0x507c70);_0x3419a7(null);};}for(var e in events){if(events[_0xe88a('0x8')](e)){var event=events[e];ChatGroup[_0xe88a('0x9')](e,emitEvent(event));}}module['exports']=ChatGroupEvents;