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 _0x0ed1=['exports','events','ChatGroup','save','update','remove','emit','hasOwnProperty'];(function(_0x39f1d4,_0xbabf59){var _0x468f70=function(_0x5a86a3){while(--_0x5a86a3){_0x39f1d4['push'](_0x39f1d4['shift']());}};_0x468f70(++_0xbabf59);}(_0x0ed1,0xb1));var _0x10ed=function(_0x38435c,_0x33fdab){_0x38435c=_0x38435c-0x0;var _0x233d0a=_0x0ed1[_0x38435c];return _0x233d0a;};'use strict';var EventEmitter=require(_0x10ed('0x0'));var ChatGroup=require('../../mysqldb')['db'][_0x10ed('0x1')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x10ed('0x2'),'afterUpdate':_0x10ed('0x3'),'afterDestroy':_0x10ed('0x4')};function emitEvent(_0x22ccc1){return function(_0x3c4bff,_0x472f08,_0x1e478c){ChatGroupEvents['emit'](_0x22ccc1+':'+_0x3c4bff['id'],_0x3c4bff);ChatGroupEvents[_0x10ed('0x5')](_0x22ccc1,_0x3c4bff);_0x1e478c(null);};}for(var e in events){if(events[_0x10ed('0x6')](e)){var event=events[e];ChatGroup['hook'](e,emitEvent(event));}}module[_0x10ed('0x7')]=ChatGroupEvents;