Built motion from commit 85328c08.|2.5.50
[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 _0xac9d=['update','emit','register','length','chatQueue:','./chatQueue.events','save','remove'];(function(_0x1d8f29,_0x205904){var _0x5c7854=function(_0xe36152){while(--_0xe36152){_0x1d8f29['push'](_0x1d8f29['shift']());}};_0x5c7854(++_0x205904);}(_0xac9d,0x14d));var _0xdac9=function(_0x47878f,_0x48d3bf){_0x47878f=_0x47878f-0x0;var _0x4b05b8=_0xac9d[_0x47878f];return _0x4b05b8;};'use strict';var ChatQueueEvents=require(_0xdac9('0x0'));var events=[_0xdac9('0x1'),_0xdac9('0x2'),_0xdac9('0x3')];function createListener(_0x12390c,_0x27eb7c){return function(_0x25d1b3){_0x27eb7c[_0xdac9('0x4')](_0x12390c,_0x25d1b3);};}function removeListener(_0x51a5d7,_0x1c17a6){return function(){ChatQueueEvents['removeListener'](_0x51a5d7,_0x1c17a6);};}exports[_0xdac9('0x5')]=function(_0x1f8ff3){for(var _0x1222bb=0x0,_0x776b6c=events[_0xdac9('0x6')];_0x1222bb<_0x776b6c;_0x1222bb++){var _0x39f560=events[_0x1222bb];var _0x5531af=createListener(_0xdac9('0x7')+_0x39f560,_0x1f8ff3);ChatQueueEvents['on'](_0x39f560,_0x5531af);}};