8c2c9bd217d568effb0f3997da57a9eea3fb7290
[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 _0x9f62=['save','update','removeListener','register','length'];(function(_0xbb091,_0x3fe7ee){var _0x467a04=function(_0x3a978d){while(--_0x3a978d){_0xbb091['push'](_0xbb091['shift']());}};_0x467a04(++_0x3fe7ee);}(_0x9f62,0x154));var _0x29f6=function(_0x2c49cf,_0x55329f){_0x2c49cf=_0x2c49cf-0x0;var _0x1928f4=_0x9f62[_0x2c49cf];return _0x1928f4;};'use strict';var ChatQueueEvents=require('./chatQueue.events');var events=[_0x29f6('0x0'),'remove',_0x29f6('0x1')];function createListener(_0x254ab3,_0x548050){return function(_0x5618b7){_0x548050['emit'](_0x254ab3,_0x5618b7);};}function removeListener(_0x258ddd,_0x2f0420){return function(){ChatQueueEvents[_0x29f6('0x2')](_0x258ddd,_0x2f0420);};}exports[_0x29f6('0x3')]=function(_0x595034){for(var _0xf66137=0x0,_0x272876=events[_0x29f6('0x4')];_0xf66137<_0x272876;_0xf66137++){var _0x2ba602=events[_0xf66137];var _0x416c6c=createListener('chatQueue:'+_0x2ba602,_0x595034);ChatQueueEvents['on'](_0x2ba602,_0x416c6c);}};