Refactor: Simplify notifications plugin

This commit is contained in:
2025-09-28 16:26:43 +02:00
parent 9f78d3ef72
commit c0e2177d71
9 changed files with 128 additions and 208 deletions

View File

@@ -188,9 +188,9 @@ export function createNotificationsCollection(options: NotificationsPluginOption
return
}
let recipientId: string
let recipientId: string|number
if (typeof doc.recipient === 'string') {
if (typeof doc.recipient === 'string' || typeof doc.recipient === 'number') {
recipientId = doc.recipient
} else if (doc.recipient?.id) {
recipientId = doc.recipient.id