96b229ca97b2002f2239272a96ba9481d2152687
[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 _0x240b=['./notification.events','save','remove','update','removeListener','register','length','notification:'];(function(_0x28d18d,_0x55896b){var _0x470640=function(_0x57e78b){while(--_0x57e78b){_0x28d18d['push'](_0x28d18d['shift']());}};_0x470640(++_0x55896b);}(_0x240b,0x118));var _0xb240=function(_0x5a4a66,_0x68a4bd){_0x5a4a66=_0x5a4a66-0x0;var _0x4898e9=_0x240b[_0x5a4a66];return _0x4898e9;};'use strict';var NotificationEvents=require(_0xb240('0x0'));var events=[_0xb240('0x1'),_0xb240('0x2'),_0xb240('0x3')];function createListener(_0x55b21c,_0x4793a4){return function(_0x1eaf40){_0x4793a4['emit'](_0x55b21c,_0x1eaf40);};}function removeListener(_0x5902f3,_0x4a678b){return function(){NotificationEvents[_0xb240('0x4')](_0x5902f3,_0x4a678b);};}exports[_0xb240('0x5')]=function(_0x15dc53){for(var _0x402f8f=0x0,_0xc8947a=events[_0xb240('0x6')];_0x402f8f<_0xc8947a;_0x402f8f++){var _0xb968f6=events[_0x402f8f];var _0xa44a42=createListener(_0xb240('0x7')+_0xb968f6,_0x15dc53);NotificationEvents['on'](_0xb968f6,_0xa44a42);}};