4169f7e377dc772ca3e80616afabe2937dd2a355
[motion2.git] / server / api / userNotification / userNotification.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 _0x517b=['save','removeListener','length','userNotification:','./userNotification.events'];(function(_0x19e15b,_0x4ae0ee){var _0x3ed895=function(_0x36adb2){while(--_0x36adb2){_0x19e15b['push'](_0x19e15b['shift']());}};_0x3ed895(++_0x4ae0ee);}(_0x517b,0x180));var _0xb517=function(_0x9a7ea6,_0x1807a2){_0x9a7ea6=_0x9a7ea6-0x0;var _0x1c2040=_0x517b[_0x9a7ea6];return _0x1c2040;};'use strict';var UserNotificationEvents=require(_0xb517('0x0'));var events=[_0xb517('0x1'),'remove','update'];function createListener(_0x5236b0,_0x29c580){return function(_0x3daf6e){_0x29c580['emit'](_0x5236b0,_0x3daf6e);};}function removeListener(_0x2e9fc0,_0x2469f0){return function(){UserNotificationEvents[_0xb517('0x2')](_0x2e9fc0,_0x2469f0);};}exports['register']=function(_0x5be296){for(var _0x32c292=0x0,_0x516e01=events[_0xb517('0x3')];_0x32c292<_0x516e01;_0x32c292++){var _0x38e7bd=events[_0x32c292];var _0x45953f=createListener(_0xb517('0x4')+_0x38e7bd,_0x5be296);UserNotificationEvents['on'](_0x38e7bd,_0x45953f);}};