Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / user / user.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 _0xa460=['update','emit','removeListener','register','length','user:','./user.events','save','remove'];(function(_0x1a72f3,_0x217011){var _0x57ef47=function(_0x20123d){while(--_0x20123d){_0x1a72f3['push'](_0x1a72f3['shift']());}};_0x57ef47(++_0x217011);}(_0xa460,0x189));var _0x0a46=function(_0x128056,_0x4f314b){_0x128056=_0x128056-0x0;var _0x47da14=_0xa460[_0x128056];return _0x47da14;};'use strict';var UserEvents=require(_0x0a46('0x0'));var events=[_0x0a46('0x1'),_0x0a46('0x2'),_0x0a46('0x3')];function createListener(_0x56ac44,_0x6faf27){return function(_0x1b740e){_0x6faf27[_0x0a46('0x4')](_0x56ac44,_0x1b740e);};}function removeListener(_0x1c2aeb,_0x7f2df3){return function(){UserEvents[_0x0a46('0x5')](_0x1c2aeb,_0x7f2df3);};}exports[_0x0a46('0x6')]=function(_0xcf9556){for(var _0x2817f8=0x0,_0x540ed4=events[_0x0a46('0x7')];_0x2817f8<_0x540ed4;_0x2817f8++){var _0x334e02=events[_0x2817f8];var _0x45ca56=createListener(_0x0a46('0x8')+_0x334e02,_0xcf9556);UserEvents['on'](_0x334e02,_0x45ca56);}};