d6cb3d36d2dabba1a107b6cd0ee7e1fc48a715e5
[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 _0x82ff=['removeListener','register','length','user:','./user.events','save','update','emit'];(function(_0x487b0c,_0x14ff74){var _0x1adbdc=function(_0x2e7b9d){while(--_0x2e7b9d){_0x487b0c['push'](_0x487b0c['shift']());}};_0x1adbdc(++_0x14ff74);}(_0x82ff,0x17c));var _0xf82f=function(_0x29c012,_0x40fa8c){_0x29c012=_0x29c012-0x0;var _0x1f4db2=_0x82ff[_0x29c012];return _0x1f4db2;};'use strict';var UserEvents=require(_0xf82f('0x0'));var events=[_0xf82f('0x1'),'remove',_0xf82f('0x2')];function createListener(_0x20819b,_0x5db811){return function(_0x534a2b){_0x5db811[_0xf82f('0x3')](_0x20819b,_0x534a2b);};}function removeListener(_0x4026e5,_0x3ddeb6){return function(){UserEvents[_0xf82f('0x4')](_0x4026e5,_0x3ddeb6);};}exports[_0xf82f('0x5')]=function(_0x5c8667){for(var _0x415a8b=0x0,_0x8d41f7=events[_0xf82f('0x6')];_0x415a8b<_0x8d41f7;_0x415a8b++){var _0x36fc34=events[_0x415a8b];var _0x5efae2=createListener(_0xf82f('0x7')+_0x36fc34,_0x5c8667);UserEvents['on'](_0x36fc34,_0x5efae2);}};