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 _0xf53f=['setMaxListeners','save','update','remove','emit','hook','events','../../mysqldb','ChatWebsite'];(function(_0x13f6bb,_0x1d625f){var _0x413673=function(_0x6dacf6){while(--_0x6dacf6){_0x13f6bb['push'](_0x13f6bb['shift']());}};_0x413673(++_0x1d625f);}(_0xf53f,0x8d));var _0xff53=function(_0x3c632e,_0x483e15){_0x3c632e=_0x3c632e-0x0;var _0x40445b=_0xf53f[_0x3c632e];return _0x40445b;};'use strict';var EventEmitter=require(_0xff53('0x0'));var ChatWebsite=require(_0xff53('0x1'))['db'][_0xff53('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xff53('0x3')](0x0);var events={'afterCreate':_0xff53('0x4'),'afterUpdate':_0xff53('0x5'),'afterDestroy':_0xff53('0x6')};function emitEvent(_0x32529d){return function(_0x18b504,_0x2077b9,_0x28dacf){ChatWebsiteEvents[_0xff53('0x7')](_0x32529d+':'+_0x18b504['id'],_0x18b504);ChatWebsiteEvents['emit'](_0x32529d,_0x18b504);_0x28dacf(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatWebsite[_0xff53('0x8')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;