a77b62405a4003dd0cc02d223d4ea9015f72b0d5
[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 _0x5ad3=['register','chatQueue:','./chatQueue.events','save','remove','update','emit','removeListener'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0x5ad3,0x1e2));var _0x35ad=function(_0x4d2993,_0x1c9473){_0x4d2993=_0x4d2993-0x0;var _0x427374=_0x5ad3[_0x4d2993];return _0x427374;};'use strict';var ChatQueueEvents=require(_0x35ad('0x0'));var events=[_0x35ad('0x1'),_0x35ad('0x2'),_0x35ad('0x3')];function createListener(_0x5543d1,_0x468072){return function(_0x373228){_0x468072[_0x35ad('0x4')](_0x5543d1,_0x373228);};}function removeListener(_0x69a0b3,_0x450f55){return function(){ChatQueueEvents[_0x35ad('0x5')](_0x69a0b3,_0x450f55);};}exports[_0x35ad('0x6')]=function(_0x436dcb){for(var _0x36c606=0x0,_0x31cc6a=events['length'];_0x36c606<_0x31cc6a;_0x36c606++){var _0x292521=events[_0x36c606];var _0x3cec3e=createListener(_0x35ad('0x7')+_0x292521,_0x436dcb);ChatQueueEvents['on'](_0x292521,_0x3cec3e);}};