d27e848e176b86eeb30216fe2dbe01cc7b5376f4
[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(_0x2423af,_0x42554e){var _0x3cd8e0=function(_0x39a559){while(--_0x39a559){_0x2423af['push'](_0x2423af['shift']());}};_0x3cd8e0(++_0x42554e);}(_0xc874,0x154));var _0x4c87=function(_0x3c81b5,_0x3f5ed7){_0x3c81b5=_0x3c81b5-0x0;var _0x5888c4=_0xc874[_0x3c81b5];return _0x5888c4;};'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);}};