function notifyMentions
notifyMentions(
mentionerUserId: string,
body: string,
contextType: "comment" | "dump" | "playlist" | "chat",
contextId: string,
contextTitle: string,
dumpId?: string,
skipUserId?: (userId: string) => boolean
): void

Notifies every user @mentioned in body, except its author, that they were mentioned in the comment, dump, playlist or chat message contextId. Call it again after each edit: a user already notified for this context isn't notified twice. skipUserId spares a mentioned user; the chat uses it for those who have it open.

Parameters

mentionerUserId: string
body: string
contextType: "comment" | "dump" | "playlist" | "chat"
contextId: string
contextTitle: string
optional
dumpId: string
optional
skipUserId: (userId: string) => boolean

Return Type

void

Usage

import { notifyMentions } from "api/services/notification-service.ts";