946316005d47ad8993a33fc020741b3b0e557bae
[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 _0xcd5e=['register','length','team:','removeListener'];(function(_0x4370c7,_0x5dbfb0){var _0xce78a9=function(_0x157b2c){while(--_0x157b2c){_0x4370c7['push'](_0x4370c7['shift']());}};_0xce78a9(++_0x5dbfb0);}(_0xcd5e,0xb3));var _0xecd5=function(_0x320c1e,_0x929425){_0x320c1e=_0x320c1e-0x0;var _0x3bafac=_0xcd5e[_0x320c1e];return _0x3bafac;};'use strict';var TeamEvents=require('./team.events');var events=['save','remove','update'];function createListener(_0x36dcb1,_0x49602d){return function(_0x301e8c){_0x49602d['emit'](_0x36dcb1,_0x301e8c);};}function removeListener(_0x183fc2,_0x24e956){return function(){TeamEvents[_0xecd5('0x0')](_0x183fc2,_0x24e956);};}exports[_0xecd5('0x1')]=function(_0x53a12b){for(var _0x3002a2=0x0,_0x555904=events[_0xecd5('0x2')];_0x3002a2<_0x555904;_0x3002a2++){var _0x3ea98a=events[_0x3002a2];var _0x22f465=createListener(_0xecd5('0x3')+_0x3ea98a,_0x53a12b);TeamEvents['on'](_0x3ea98a,_0x22f465);}};