Built motion from commit 08fb8613.|2.6.31
[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 _0xbf33=['removeListener','length','./userNotification.events','remove'];(function(_0xa2354c,_0x26c8c8){var _0x4c19b3=function(_0x209696){while(--_0x209696){_0xa2354c['push'](_0xa2354c['shift']());}};_0x4c19b3(++_0x26c8c8);}(_0xbf33,0xee));var _0x3bf3=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0xbf33[_0x2b4411];return _0x8e41ef;};'use strict';var UserNotificationEvents=require(_0x3bf3('0x0'));var events=['save',_0x3bf3('0x1'),'update'];function createListener(_0x45cc94,_0x4d9919){return function(_0x5c95da){_0x4d9919['emit'](_0x45cc94,_0x5c95da);};}function removeListener(_0x11cf61,_0x415ddc){return function(){UserNotificationEvents[_0x3bf3('0x2')](_0x11cf61,_0x415ddc);};}exports['register']=function(_0x36867a){for(var _0x33aade=0x0,_0x5d4c99=events[_0x3bf3('0x3')];_0x33aade<_0x5d4c99;_0x33aade++){var _0x58f731=events[_0x33aade];var _0x41941c=createListener('userNotification:'+_0x58f731,_0x36867a);UserNotificationEvents['on'](_0x58f731,_0x41941c);}};