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 _0x68f5=['events','../../mysqldb','save','update','remove','emit','exports'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x68f5,0x93));var _0x568f=function(_0x55ad61,_0x1dc045){_0x55ad61=_0x55ad61-0x0;var _0x437a13=_0x68f5[_0x55ad61];return _0x437a13;};'use strict';var EventEmitter=require(_0x568f('0x0'));var ChatInternalMessage=require(_0x568f('0x1'))['db']['ChatInternalMessage'];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x568f('0x2'),'afterUpdate':_0x568f('0x3'),'afterDestroy':_0x568f('0x4')};function emitEvent(_0x4fcb97){return function(_0x5368ba,_0x30f706,_0x4d329d){ChatInternalMessageEvents['emit'](_0x4fcb97+':'+_0x5368ba['id'],_0x5368ba);ChatInternalMessageEvents[_0x568f('0x5')](_0x4fcb97,_0x5368ba);_0x4d329d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module[_0x568f('0x6')]=ChatInternalMessageEvents;