b13d8883ec782567064ce6179530bb9119c3777a
[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 _0x7bae=['remove','update','emit','removeListener','register','length','chatQueue:'];(function(_0x1d66d5,_0xf9d343){var _0x55d82f=function(_0x55665c){while(--_0x55665c){_0x1d66d5['push'](_0x1d66d5['shift']());}};_0x55d82f(++_0xf9d343);}(_0x7bae,0x13b));var _0xe7ba=function(_0x56482c,_0x16118d){_0x56482c=_0x56482c-0x0;var _0x5aae7a=_0x7bae[_0x56482c];return _0x5aae7a;};'use strict';var ChatQueueEvents=require('./chatQueue.events');var events=['save',_0xe7ba('0x0'),_0xe7ba('0x1')];function createListener(_0x503803,_0x3963c7){return function(_0x4f2e91){_0x3963c7[_0xe7ba('0x2')](_0x503803,_0x4f2e91);};}function removeListener(_0x10908b,_0x166acb){return function(){ChatQueueEvents[_0xe7ba('0x3')](_0x10908b,_0x166acb);};}exports[_0xe7ba('0x4')]=function(_0xfd3a22){for(var _0x2d31df=0x0,_0x3c5e59=events[_0xe7ba('0x5')];_0x2d31df<_0x3c5e59;_0x2d31df++){var _0x34fb18=events[_0x2d31df];var _0x160565=createListener(_0xe7ba('0x6')+_0x34fb18,_0xfd3a22);ChatQueueEvents['on'](_0x34fb18,_0x160565);}};