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 _0x8bcf=['update','remove','emit','hook','exports','events','ChatGroup','setMaxListeners','save'];(function(_0x5e6cb8,_0x16cf56){var _0x3faeb3=function(_0x1a7355){while(--_0x1a7355){_0x5e6cb8['push'](_0x5e6cb8['shift']());}};_0x3faeb3(++_0x16cf56);}(_0x8bcf,0x1be));var _0xf8bc=function(_0x50b2c4,_0x22747a){_0x50b2c4=_0x50b2c4-0x0;var _0x6c9879=_0x8bcf[_0x50b2c4];return _0x6c9879;};'use strict';var EventEmitter=require(_0xf8bc('0x0'));var ChatGroup=require('../../mysqldb')['db'][_0xf8bc('0x1')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0xf8bc('0x2')](0x0);var events={'afterCreate':_0xf8bc('0x3'),'afterUpdate':_0xf8bc('0x4'),'afterDestroy':_0xf8bc('0x5')};function emitEvent(_0x3177b8){return function(_0x3f6d71,_0xfd0ffd,_0x26726a){ChatGroupEvents[_0xf8bc('0x6')](_0x3177b8+':'+_0x3f6d71['id'],_0x3f6d71);ChatGroupEvents[_0xf8bc('0x6')](_0x3177b8,_0x3f6d71);_0x26726a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatGroup[_0xf8bc('0x7')](e,emitEvent(event));}}module[_0xf8bc('0x8')]=ChatGroupEvents;