f1f2fbd49452b0d92fc915b133d5716648e73de8
[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 _0x84ab=['update','emit','removeListener','register','length','chatQueue:','./chatQueue.events','save','remove'];(function(_0x47e9b6,_0x3e3d56){var _0x596fe6=function(_0x5ca075){while(--_0x5ca075){_0x47e9b6['push'](_0x47e9b6['shift']());}};_0x596fe6(++_0x3e3d56);}(_0x84ab,0x12f));var _0xb84a=function(_0x2a55f8,_0x540ac4){_0x2a55f8=_0x2a55f8-0x0;var _0x245efd=_0x84ab[_0x2a55f8];return _0x245efd;};'use strict';var ChatQueueEvents=require(_0xb84a('0x0'));var events=[_0xb84a('0x1'),_0xb84a('0x2'),_0xb84a('0x3')];function createListener(_0x473c3,_0x512f13){return function(_0xc83587){_0x512f13[_0xb84a('0x4')](_0x473c3,_0xc83587);};}function removeListener(_0x47b8e3,_0x9d3a00){return function(){ChatQueueEvents[_0xb84a('0x5')](_0x47b8e3,_0x9d3a00);};}exports[_0xb84a('0x6')]=function(_0x5b9def){for(var _0x521a64=0x0,_0x4dc496=events[_0xb84a('0x7')];_0x521a64<_0x4dc496;_0x521a64++){var _0x4fac4d=events[_0x521a64];var _0x3e9086=createListener(_0xb84a('0x8')+_0x4fac4d,_0x5b9def);ChatQueueEvents['on'](_0x4fac4d,_0x3e9086);}};