Built motion from commit 52c8a02d.|2.6.29
[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 _0xcea2=['chatQueue:','./chatQueue.events','remove','removeListener','length'];(function(_0x31ce32,_0x3870a8){var _0x40958b=function(_0x533129){while(--_0x533129){_0x31ce32['push'](_0x31ce32['shift']());}};_0x40958b(++_0x3870a8);}(_0xcea2,0x15a));var _0x2cea=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0xcea2[_0xc4001c];return _0x49f7bc;};'use strict';var ChatQueueEvents=require(_0x2cea('0x0'));var events=['save',_0x2cea('0x1'),'update'];function createListener(_0x3e22c2,_0x7f1f5a){return function(_0x60a793){_0x7f1f5a['emit'](_0x3e22c2,_0x60a793);};}function removeListener(_0x3ff73f,_0x46060b){return function(){ChatQueueEvents[_0x2cea('0x2')](_0x3ff73f,_0x46060b);};}exports['register']=function(_0x34f0f2){for(var _0x485c26=0x0,_0x2d69ff=events[_0x2cea('0x3')];_0x485c26<_0x2d69ff;_0x485c26++){var _0x805a1b=events[_0x485c26];var _0x160cca=createListener(_0x2cea('0x4')+_0x805a1b,_0x34f0f2);ChatQueueEvents['on'](_0x805a1b,_0x160cca);}};