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 _0x099f=['save','update','remove','emit','events','../../mysqldb','UserSetting'];(function(_0x3a1522,_0x51684f){var _0x2c7785=function(_0xa99654){while(--_0xa99654){_0x3a1522['push'](_0x3a1522['shift']());}};_0x2c7785(++_0x51684f);}(_0x099f,0x90));var _0xf099=function(_0x2c677a,_0x19bf65){_0x2c677a=_0x2c677a-0x0;var _0x42f078=_0x099f[_0x2c677a];return _0x42f078;};'use strict';var EventEmitter=require(_0xf099('0x0'));var UserSetting=require(_0xf099('0x1'))['db'][_0xf099('0x2')];var UserSettingEvents=new EventEmitter();UserSettingEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf099('0x3'),'afterUpdate':_0xf099('0x4'),'afterDestroy':_0xf099('0x5')};function emitEvent(_0x2195c8){return function(_0x40f573,_0xc1e4af,_0x2f897a){UserSettingEvents[_0xf099('0x6')](_0x2195c8+':'+_0x40f573['id'],_0x40f573);UserSettingEvents[_0xf099('0x6')](_0x2195c8,_0x40f573);_0x2f897a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserSetting['hook'](e,emitEvent(event));}}module['exports']=UserSettingEvents;