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 _0x92bc=['remove','emit','exports','events','../../mysqldb','ChatInternalMessage','update'];(function(_0x21aec3,_0x5c97e9){var _0x288bbc=function(_0x2283fe){while(--_0x2283fe){_0x21aec3['push'](_0x21aec3['shift']());}};_0x288bbc(++_0x5c97e9);}(_0x92bc,0x106));var _0xc92b=function(_0x355ade,_0x2d777c){_0x355ade=_0x355ade-0x0;var _0x587b96=_0x92bc[_0x355ade];return _0x587b96;};'use strict';var EventEmitter=require(_0xc92b('0x0'));var ChatInternalMessage=require(_0xc92b('0x1'))['db'][_0xc92b('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xc92b('0x3'),'afterDestroy':_0xc92b('0x4')};function emitEvent(_0x35903f){return function(_0x1d7812,_0x56c979,_0x2dcfaa){ChatInternalMessageEvents[_0xc92b('0x5')](_0x35903f+':'+_0x1d7812['id'],_0x1d7812);ChatInternalMessageEvents[_0xc92b('0x5')](_0x35903f,_0x1d7812);_0x2dcfaa(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module[_0xc92b('0x6')]=ChatInternalMessageEvents;