aed56da4619cf1b80643ea153fca59aab4d427d6
[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 _0x1c21=['remove','update','user:','./user.events'];(function(_0x5447fd,_0x52a6b5){var _0x15b28a=function(_0x370d4f){while(--_0x370d4f){_0x5447fd['push'](_0x5447fd['shift']());}};_0x15b28a(++_0x52a6b5);}(_0x1c21,0x19f));var _0x11c2=function(_0x501429,_0x20b28e){_0x501429=_0x501429-0x0;var _0x4864e1=_0x1c21[_0x501429];return _0x4864e1;};'use strict';var UserEvents=require(_0x11c2('0x0'));var events=['save',_0x11c2('0x1'),_0x11c2('0x2')];function createListener(_0x52c0e1,_0x3b42ab){return function(_0x7b2024){_0x3b42ab['emit'](_0x52c0e1,_0x7b2024);};}function removeListener(_0x2c95f4,_0x2253b4){return function(){UserEvents['removeListener'](_0x2c95f4,_0x2253b4);};}exports['register']=function(_0x596005){for(var _0xc0894=0x0,_0x1b291f=events['length'];_0xc0894<_0x1b291f;_0xc0894++){var _0x2b8edc=events[_0xc0894];var _0x47f11b=createListener(_0x11c2('0x3')+_0x2b8edc,_0x596005);UserEvents['on'](_0x2b8edc,_0x47f11b);}};