897ae642491755a7122bca4aa540d1617120e451
[motion2.git] / server / api / team / team.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 _0xe0bf=['update','removeListener','length','./team.events','save','remove'];(function(_0x12a32a,_0x200871){var _0x45c462=function(_0x49f34d){while(--_0x49f34d){_0x12a32a['push'](_0x12a32a['shift']());}};_0x45c462(++_0x200871);}(_0xe0bf,0x75));var _0xfe0b=function(_0x4eab9c,_0x30170e){_0x4eab9c=_0x4eab9c-0x0;var _0x380397=_0xe0bf[_0x4eab9c];return _0x380397;};'use strict';var TeamEvents=require(_0xfe0b('0x0'));var events=[_0xfe0b('0x1'),_0xfe0b('0x2'),_0xfe0b('0x3')];function createListener(_0x15c69c,_0x25a77b){return function(_0x30b005){_0x25a77b['emit'](_0x15c69c,_0x30b005);};}function removeListener(_0x51dc99,_0x532468){return function(){TeamEvents[_0xfe0b('0x4')](_0x51dc99,_0x532468);};}exports['register']=function(_0x2cb051){for(var _0x224b5e=0x0,_0x4dc6e7=events[_0xfe0b('0x5')];_0x224b5e<_0x4dc6e7;_0x224b5e++){var _0x36e6ce=events[_0x224b5e];var _0x4b38df=createListener('team:'+_0x36e6ce,_0x2cb051);TeamEvents['on'](_0x36e6ce,_0x4b38df);}};