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 _0xa76e=['hasOwnProperty','exports','../../mysqldb','ChatInternalMessage','update','emit'];(function(_0x96d000,_0x1830c3){var _0xc96352=function(_0x525197){while(--_0x525197){_0x96d000['push'](_0x96d000['shift']());}};_0xc96352(++_0x1830c3);}(_0xa76e,0xfe));var _0xea76=function(_0x43b06b,_0x1929c7){_0x43b06b=_0x43b06b-0x0;var _0x2c555b=_0xa76e[_0x43b06b];return _0x2c555b;};'use strict';var EventEmitter=require('events');var ChatInternalMessage=require(_0xea76('0x0'))['db'][_0xea76('0x1')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xea76('0x2'),'afterDestroy':'remove'};function emitEvent(_0x1d5309){return function(_0x368f89,_0xd37efd,_0x4ed094){ChatInternalMessageEvents[_0xea76('0x3')](_0x1d5309+':'+_0x368f89['id'],_0x368f89);ChatInternalMessageEvents['emit'](_0x1d5309,_0x368f89);_0x4ed094(null);};}for(var e in events){if(events[_0xea76('0x4')](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module[_0xea76('0x5')]=ChatInternalMessageEvents;