Web: Fix clear=true on action buttons not clearing the notification

This commit is contained in:
binwiederhier
2026-02-05 09:40:18 -08:00
parent 6978fa69a8
commit 1b554d5b08
4 changed files with 44 additions and 5 deletions

View File

@@ -60,6 +60,7 @@ export const toNotificationParams = ({ message, defaultTitle, topicRoute, baseUr
const image = isImage(message.attachment) ? message.attachment.url : undefined;
const sequenceId = message.sequence_id || message.id;
const tag = notificationTag(baseUrl, topic, sequenceId);
const subscriptionId = `${baseUrl}/${topic}`;
// https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API
return [
@@ -75,6 +76,7 @@ export const toNotificationParams = ({ message, defaultTitle, topicRoute, baseUr
silent: false,
// This is used by the notification onclick event
data: {
subscriptionId,
message,
topicRoute,
},