feat: support for topic in notification

using same topic twice will restore existing notification in that topic
if any. this can be useful if you want to remind users about some
specific thing over time

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-01-26 14:44:30 +02:00
parent dced4bbc96
commit 50c7dbde2f
10 changed files with 124 additions and 15 deletions
+3
View File
@@ -53,3 +53,6 @@ save the notification and optionally signal the frontend to show the latest stat
When sending notifications, you can specify the entity reference of the notification. If the entity reference is
a user, the notification will be sent to only that user. If it's a group, the notification will be sent to all
members of the group. If it's some other entity, the notification will be sent to the owner of that entity.
If the notification has `topic` set and user already has notification with that topic, the existing notification
will be updated with the new notification values and moved to inbox as unread.
+1
View File
@@ -38,6 +38,7 @@ export type NotificationSendOptions = {
title: string;
description: string;
link: string;
topic?: string;
};
// @public (undocumented)
@@ -38,6 +38,7 @@ export type NotificationSendOptions = {
title: string;
description: string;
link: string;
topic?: string;
};
/** @public */