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 _0x6f7b=['../../mysqldb','ChatWebsite','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0x6f7b,0x168));var _0xb6f7=function(_0x2fe5f9,_0x4c24c6){_0x2fe5f9=_0x2fe5f9-0x0;var _0x82b8a7=_0x6f7b[_0x2fe5f9];return _0x82b8a7;};'use strict';var EventEmitter=require('events');var ChatWebsite=require(_0xb6f7('0x0'))['db'][_0xb6f7('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xb6f7('0x2')](0x0);var events={'afterCreate':_0xb6f7('0x3'),'afterUpdate':_0xb6f7('0x4'),'afterDestroy':_0xb6f7('0x5')};function emitEvent(_0x100f8c){return function(_0x572ba4,_0x284b07,_0x58f18b){ChatWebsiteEvents[_0xb6f7('0x6')](_0x100f8c+':'+_0x572ba4['id'],_0x572ba4);ChatWebsiteEvents[_0xb6f7('0x6')](_0x100f8c,_0x572ba4);_0x58f18b(null);};}for(var e in events){if(events[_0xb6f7('0x7')](e)){var event=events[e];ChatWebsite[_0xb6f7('0x8')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;