Built motion from commit (unavailable).|2.5.4
[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 _0x30b4=['register','./user.events','save','remove','emit','removeListener'];(function(_0x3c963f,_0x277ba6){var _0x5995af=function(_0x1a02c1){while(--_0x1a02c1){_0x3c963f['push'](_0x3c963f['shift']());}};_0x5995af(++_0x277ba6);}(_0x30b4,0x1e1));var _0x430b=function(_0x1b664d,_0x1d8695){_0x1b664d=_0x1b664d-0x0;var _0x43af6b=_0x30b4[_0x1b664d];return _0x43af6b;};'use strict';var UserEvents=require(_0x430b('0x0'));var events=[_0x430b('0x1'),_0x430b('0x2'),'update'];function createListener(_0x5decbc,_0x585a77){return function(_0x423a01){_0x585a77[_0x430b('0x3')](_0x5decbc,_0x423a01);};}function removeListener(_0x27f8df,_0x3178d3){return function(){UserEvents[_0x430b('0x4')](_0x27f8df,_0x3178d3);};}exports[_0x430b('0x5')]=function(_0x33a2ce){for(var _0x3a6377=0x0,_0x2d04db=events['length'];_0x3a6377<_0x2d04db;_0x3a6377++){var _0x4af45c=events[_0x3a6377];var _0x4bd1e3=createListener('user:'+_0x4af45c,_0x33a2ce);UserEvents['on'](_0x4af45c,_0x4bd1e3);}};