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> {
public async perform(event: CommentUpdateEvent) {
const newMentionIds = event.data.newMentionIds;
const newMentionIds = event.data?.newMentionIds;
if (!newMentionIds) {
return;
}

View File

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