78a7d40640e185b2c8d6065bd3c11bdd6bf9b559
[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 _0x61c9=['register','length','user:','./user.events','remove','update','emit'];(function(_0x5d18a6,_0x416183){var _0x335faf=function(_0x46ee0a){while(--_0x46ee0a){_0x5d18a6['push'](_0x5d18a6['shift']());}};_0x335faf(++_0x416183);}(_0x61c9,0xc0));var _0x961c=function(_0x2e067a,_0xab528c){_0x2e067a=_0x2e067a-0x0;var _0xc64976=_0x61c9[_0x2e067a];return _0xc64976;};'use strict';var UserEvents=require(_0x961c('0x0'));var events=['save',_0x961c('0x1'),_0x961c('0x2')];function createListener(_0x3157c5,_0x5e488f){return function(_0x46b47b){_0x5e488f[_0x961c('0x3')](_0x3157c5,_0x46b47b);};}function removeListener(_0x48514a,_0x700ab4){return function(){UserEvents['removeListener'](_0x48514a,_0x700ab4);};}exports[_0x961c('0x4')]=function(_0x5acebc){for(var _0x38b62d=0x0,_0x1e77ff=events[_0x961c('0x5')];_0x38b62d<_0x1e77ff;_0x38b62d++){var _0xc0f510=events[_0x38b62d];var _0x3e8654=createListener(_0x961c('0x6')+_0xc0f510,_0x5acebc);UserEvents['on'](_0xc0f510,_0x3e8654);}};