Built motion from commit e6806ed6.|2.6.0
[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 _0xd1a6=['userNotification:','save','update','removeListener','register','length'];(function(_0x546f14,_0x199e7f){var _0x581a52=function(_0x1f7759){while(--_0x1f7759){_0x546f14['push'](_0x546f14['shift']());}};_0x581a52(++_0x199e7f);}(_0xd1a6,0x145));var _0x6d1a=function(_0x5da8e9,_0x3beb32){_0x5da8e9=_0x5da8e9-0x0;var _0x24a605=_0xd1a6[_0x5da8e9];return _0x24a605;};'use strict';var UserNotificationEvents=require('./userNotification.events');var events=[_0x6d1a('0x0'),'remove',_0x6d1a('0x1')];function createListener(_0x100761,_0x34b858){return function(_0x511b60){_0x34b858['emit'](_0x100761,_0x511b60);};}function removeListener(_0x8f0bfd,_0x86186){return function(){UserNotificationEvents[_0x6d1a('0x2')](_0x8f0bfd,_0x86186);};}exports[_0x6d1a('0x3')]=function(_0x471d18){for(var _0x46f15f=0x0,_0x14ba75=events[_0x6d1a('0x4')];_0x46f15f<_0x14ba75;_0x46f15f++){var _0x324b7a=events[_0x46f15f];var _0x4999f5=createListener(_0x6d1a('0x5')+_0x324b7a,_0x471d18);UserNotificationEvents['on'](_0x324b7a,_0x4999f5);}};