96e5c259706f92e94b09947fb24011694bce4852
[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 _0x8375=['userNotification:','save','remove','update','register'];(function(_0x4c132a,_0x4866fa){var _0x3205e7=function(_0x2ef70d){while(--_0x2ef70d){_0x4c132a['push'](_0x4c132a['shift']());}};_0x3205e7(++_0x4866fa);}(_0x8375,0x132));var _0x5837=function(_0x533e10,_0x317b46){_0x533e10=_0x533e10-0x0;var _0x21d0cf=_0x8375[_0x533e10];return _0x21d0cf;};'use strict';var UserNotificationEvents=require('./userNotification.events');var events=[_0x5837('0x0'),_0x5837('0x1'),_0x5837('0x2')];function createListener(_0x1fb900,_0x3bd795){return function(_0x144751){_0x3bd795['emit'](_0x1fb900,_0x144751);};}function removeListener(_0x2ddfc1,_0x110a7d){return function(){UserNotificationEvents['removeListener'](_0x2ddfc1,_0x110a7d);};}exports[_0x5837('0x3')]=function(_0x438491){for(var _0x21c9bd=0x0,_0x1e0d00=events['length'];_0x21c9bd<_0x1e0d00;_0x21c9bd++){var _0x23454c=events[_0x21c9bd];var _0x1f4f78=createListener(_0x5837('0x4')+_0x23454c,_0x438491);UserNotificationEvents['on'](_0x23454c,_0x1f4f78);}};