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 _0x788c=['../../mysqldb','setMaxListeners','update','hasOwnProperty','hook','exports'];(function(_0x46bc75,_0x3fda3b){var _0x3294c5=function(_0x680c3b){while(--_0x680c3b){_0x46bc75['push'](_0x46bc75['shift']());}};_0x3294c5(++_0x3fda3b);}(_0x788c,0xf6));var _0xc788=function(_0x336ec5,_0x35cc88){_0x336ec5=_0x336ec5-0x0;var _0x39aa1f=_0x788c[_0x336ec5];return _0x39aa1f;};'use strict';var EventEmitter=require('events');var ChatGroup=require(_0xc788('0x0'))['db']['ChatGroup'];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0xc788('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc788('0x2'),'afterDestroy':'remove'};function emitEvent(_0x526ec5){return function(_0x13d917,_0x1235c0,_0x15c1f2){ChatGroupEvents['emit'](_0x526ec5+':'+_0x13d917['id'],_0x13d917);ChatGroupEvents['emit'](_0x526ec5,_0x13d917);_0x15c1f2(null);};}for(var e in events){if(events[_0xc788('0x3')](e)){var event=events[e];ChatGroup[_0xc788('0x4')](e,emitEvent(event));}}module[_0xc788('0x5')]=ChatGroupEvents;