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 _0x95c2=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save','update','remove'];(function(_0x376b45,_0x5964fb){var _0x2341b3=function(_0x5a7f01){while(--_0x5a7f01){_0x376b45['push'](_0x376b45['shift']());}};_0x2341b3(++_0x5964fb);}(_0x95c2,0x9a));var _0x295c=function(_0x10f0f0,_0x2fa3f4){_0x10f0f0=_0x10f0f0-0x0;var _0x389a13=_0x95c2[_0x10f0f0];return _0x389a13;};'use strict';var EventEmitter=require(_0x295c('0x0'));var ChatGroup=require(_0x295c('0x1'))['db']['ChatGroup'];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x295c('0x2')](0x0);var events={'afterCreate':_0x295c('0x3'),'afterUpdate':_0x295c('0x4'),'afterDestroy':_0x295c('0x5')};function emitEvent(_0x2c389c){return function(_0x5195ce,_0xa3dc09,_0x342dca){ChatGroupEvents[_0x295c('0x6')](_0x2c389c+':'+_0x5195ce['id'],_0x5195ce);ChatGroupEvents['emit'](_0x2c389c,_0x5195ce);_0x342dca(null);};}for(var e in events){if(events[_0x295c('0x7')](e)){var event=events[e];ChatGroup[_0x295c('0x8')](e,emitEvent(event));}}module[_0x295c('0x9')]=ChatGroupEvents;