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 _0xaefd=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','../../mysqldb'];(function(_0x29b084,_0x5d8725){var _0x42edf8=function(_0x25a36a){while(--_0x25a36a){_0x29b084['push'](_0x29b084['shift']());}};_0x42edf8(++_0x5d8725);}(_0xaefd,0xa7));var _0xdaef=function(_0x413b07,_0x1be6dc){_0x413b07=_0x413b07-0x0;var _0x428e1e=_0xaefd[_0x413b07];return _0x428e1e;};'use strict';var EventEmitter=require('events');var ChatInternalMessage=require(_0xdaef('0x0'))['db']['ChatInternalMessage'];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0xdaef('0x1')](0x0);var events={'afterCreate':_0xdaef('0x2'),'afterUpdate':_0xdaef('0x3'),'afterDestroy':_0xdaef('0x4')};function emitEvent(_0x4b0105){return function(_0x4af4b1,_0x515d9c,_0x2cc9fe){ChatInternalMessageEvents[_0xdaef('0x5')](_0x4b0105+':'+_0x4af4b1['id'],_0x4af4b1);ChatInternalMessageEvents[_0xdaef('0x5')](_0x4b0105,_0x4af4b1);_0x2cc9fe(null);};}for(var e in events){if(events[_0xdaef('0x6')](e)){var event=events[e];ChatInternalMessage[_0xdaef('0x7')](e,emitEvent(event));}}module['exports']=ChatInternalMessageEvents;