Built motion from commit e6806ed6.|2.6.0
[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 _0x668b=['./chatQueue.events','save','update','removeListener','length'];(function(_0x14d213,_0x5290d8){var _0x5a374a=function(_0x540aa1){while(--_0x540aa1){_0x14d213['push'](_0x14d213['shift']());}};_0x5a374a(++_0x5290d8);}(_0x668b,0x140));var _0xb668=function(_0x7729b1,_0x468322){_0x7729b1=_0x7729b1-0x0;var _0x349504=_0x668b[_0x7729b1];return _0x349504;};'use strict';var ChatQueueEvents=require(_0xb668('0x0'));var events=[_0xb668('0x1'),'remove',_0xb668('0x2')];function createListener(_0x2c30c1,_0x49a53b){return function(_0x336ba4){_0x49a53b['emit'](_0x2c30c1,_0x336ba4);};}function removeListener(_0x2fab11,_0x4092a6){return function(){ChatQueueEvents[_0xb668('0x3')](_0x2fab11,_0x4092a6);};}exports['register']=function(_0x9b99a8){for(var _0x296fa9=0x0,_0x3be92e=events[_0xb668('0x4')];_0x296fa9<_0x3be92e;_0x296fa9++){var _0x20b749=events[_0x296fa9];var _0x3f01bc=createListener('chatQueue:'+_0x20b749,_0x9b99a8);ChatQueueEvents['on'](_0x20b749,_0x3f01bc);}};