c6474a6af3a18a49260aa93d5c9ccdd518989245
[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 _0xfcb7=['length','./userNotification.events','save','remove','emit','removeListener','register'];(function(_0x4f475c,_0x48d78c){var _0x31402e=function(_0x4c72f8){while(--_0x4c72f8){_0x4f475c['push'](_0x4f475c['shift']());}};_0x31402e(++_0x48d78c);}(_0xfcb7,0xa9));var _0x7fcb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfcb7[_0x3dd15e];return _0x231fd0;};'use strict';var UserNotificationEvents=require(_0x7fcb('0x0'));var events=[_0x7fcb('0x1'),_0x7fcb('0x2'),'update'];function createListener(_0x3c9b8b,_0x29938c){return function(_0x5ea2d5){_0x29938c[_0x7fcb('0x3')](_0x3c9b8b,_0x5ea2d5);};}function removeListener(_0x3dd82f,_0x5df628){return function(){UserNotificationEvents[_0x7fcb('0x4')](_0x3dd82f,_0x5df628);};}exports[_0x7fcb('0x5')]=function(_0xa692a4){for(var _0x40b25b=0x0,_0x43b1d7=events[_0x7fcb('0x6')];_0x40b25b<_0x43b1d7;_0x40b25b++){var _0x3866a4=events[_0x40b25b];var _0x4ce49d=createListener('userNotification:'+_0x3866a4,_0xa692a4);UserNotificationEvents['on'](_0x3866a4,_0x4ce49d);}};