@eclipse-slm/ui 1.5.0-snapshot.2 → 1.5.0-snapshot.845
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -38,13 +38,13 @@ class NotificationServiceWebsocketClient {
|
|
|
38
38
|
Issuer: `${globals.$keycloak.keycloak.authServerUrl}/realms/${globals.$keycloak.keycloak.realm}`
|
|
39
39
|
},
|
|
40
40
|
() => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// direct topic fallback for convertAndSend("/topic/notifications/{userId}", ...)
|
|
41
|
+
// The backend publishes every notification to both destinations, so subscribe to only one
|
|
42
|
+
// of them, otherwise each notification is processed (and toasted) twice
|
|
44
43
|
if (userId) {
|
|
45
44
|
this.stompClient.subscribe(subscriptionName, NotificationServiceWebsocketClient.processNotificationMessage);
|
|
46
45
|
} else {
|
|
47
|
-
console.warn('Unable to resolve websocket user id
|
|
46
|
+
console.warn('Unable to resolve websocket user id, falling back to /user/topic/notifications subscription')
|
|
47
|
+
this.stompClient.subscribe('/user/topic/notifications', NotificationServiceWebsocketClient.processNotificationMessage);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
(error) => {
|