db3f523b82f2c35d150a3c2f8c0bf067db9536a7
[motion2.git] / server / api / chatQueue / chatQueue.socket.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 _0xc874=['emit','removeListener','register','length','./chatQueue.events','remove','update'];(function(_0xfb2d7d,_0x48e158){var _0xa96c79=function(_0x3f61d2){while(--_0x3f61d2){_0xfb2d7d['push'](_0xfb2d7d['shift']());}};_0xa96c79(++_0x48e158);}(_0xc874,0x154));var _0x4c87=function(_0x13b392,_0x3481f2){_0x13b392=_0x13b392-0x0;var _0x39db24=_0xc874[_0x13b392];return _0x39db24;};'use strict';var ChatQueueEvents=require(_0x4c87('0x0'));var events=['save',_0x4c87('0x1'),_0x4c87('0x2')];function createListener(_0x505440,_0x5e6d61){return function(_0xfc1b9f){_0x5e6d61[_0x4c87('0x3')](_0x505440,_0xfc1b9f);};}function removeListener(_0x1c3dbc,_0x575a7c){return function(){ChatQueueEvents[_0x4c87('0x4')](_0x1c3dbc,_0x575a7c);};}exports[_0x4c87('0x5')]=function(_0x5d63ae){for(var _0x46e0f5=0x0,_0x3dafe0=events[_0x4c87('0x6')];_0x46e0f5<_0x3dafe0;_0x46e0f5++){var _0xdc4a29=events[_0x46e0f5];var _0x116649=createListener('chatQueue:'+_0xdc4a29,_0x5d63ae);ChatQueueEvents['on'](_0xdc4a29,_0x116649);}};