feat: support to filter notification recipients after resolving

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-04-17 22:58:42 +03:00
parent b35ea54a76
commit 295c05db69
4 changed files with 33 additions and 2 deletions
@@ -28,7 +28,16 @@ export type NotificationServiceOptions = {
export type NotificationRecipients =
| {
type: 'entity';
/**
* Entity references to send the notifications to
*/
entityRef: string | string[];
/**
* Optional entity reference(s) to filter out of the resolved recipients.
* Usually the currently logged-in user for preventing sending notification
* of user action to him/herself.
*/
excludeEntityRef?: string | string[];
}
| { type: 'broadcast' };