fix: newMentionIds no longer always in event data

This commit is contained in:
Tom Moor
2024-07-03 17:58:15 -04:00
parent de90f879f1
commit 1711d17e25
2 changed files with 3 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ import BaseTask, { TaskPriority } from "./BaseTask";
export default class CommentUpdatedNotificationsTask extends BaseTask<CommentEvent> { export default class CommentUpdatedNotificationsTask extends BaseTask<CommentEvent> {
public async perform(event: CommentUpdateEvent) { public async perform(event: CommentUpdateEvent) {
const newMentionIds = event.data.newMentionIds; const newMentionIds = event.data?.newMentionIds;
if (!newMentionIds) { if (!newMentionIds) {
return; return;
} }

View File

@@ -341,8 +341,8 @@ export type CommentUpdateEvent = BaseEvent<Comment> & {
modelId: string; modelId: string;
documentId: string; documentId: string;
actorId: string; actorId: string;
data: { data?: {
newMentionIds?: string[]; newMentionIds: string[];
}; };
}; };