Built motion from commit (unavailable).|2.3.98
[motion2.git] / server / api / chatQueue / chatQueue.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xdc64=['ChatQueue','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x2bd00e,_0x586718){var _0x469eba=function(_0x1945bb){while(--_0x1945bb){_0x2bd00e['push'](_0x2bd00e['shift']());}};_0x469eba(++_0x586718);}(_0xdc64,0x80));var _0x4dc6=function(_0x259e09,_0x43dc8e){_0x259e09=_0x259e09-0x0;var _0x221f0f=_0xdc64[_0x259e09];return _0x221f0f;};'use strict';var EventEmitter=require(_0x4dc6('0x0'));var ChatQueue=require(_0x4dc6('0x1'))['db'][_0x4dc6('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x4dc6('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x4dc6('0x4'),'afterDestroy':_0x4dc6('0x5')};function emitEvent(_0x31edee){return function(_0x6a357f,_0x425b2c,_0x45c35c){ChatQueueEvents[_0x4dc6('0x6')](_0x31edee+':'+_0x6a357f['id'],_0x6a357f);ChatQueueEvents[_0x4dc6('0x6')](_0x31edee,_0x6a357f);_0x45c35c(null);};}for(var e in events){if(events[_0x4dc6('0x7')](e)){var event=events[e];ChatQueue[_0x4dc6('0x8')](e,emitEvent(event));}}module[_0x4dc6('0x9')]=ChatQueueEvents;