84ca5e8b95d374d2852c0f28765baeb41d4132d3
[motion2.git] / server / api / notification / notification.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 _0xd189=['register','notification:','./notification.events','save','update','emit','removeListener'];(function(_0x81dcac,_0x8ff7db){var _0xc7803b=function(_0x499b29){while(--_0x499b29){_0x81dcac['push'](_0x81dcac['shift']());}};_0xc7803b(++_0x8ff7db);}(_0xd189,0x144));var _0x9d18=function(_0x2e1f5d,_0xbf2953){_0x2e1f5d=_0x2e1f5d-0x0;var _0x4a2176=_0xd189[_0x2e1f5d];return _0x4a2176;};'use strict';var NotificationEvents=require(_0x9d18('0x0'));var events=[_0x9d18('0x1'),'remove',_0x9d18('0x2')];function createListener(_0x424ad4,_0x1b4f34){return function(_0x5aec4f){_0x1b4f34[_0x9d18('0x3')](_0x424ad4,_0x5aec4f);};}function removeListener(_0x18979a,_0x595d71){return function(){NotificationEvents[_0x9d18('0x4')](_0x18979a,_0x595d71);};}exports[_0x9d18('0x5')]=function(_0x574783){for(var _0x571656=0x0,_0xd40127=events['length'];_0x571656<_0xd40127;_0x571656++){var _0x463e2f=events[_0x571656];var _0x16955b=createListener(_0x9d18('0x6')+_0x463e2f,_0x574783);NotificationEvents['on'](_0x463e2f,_0x16955b);}};