diff --git a/server/queues/tasks/CommentUpdatedNotificationsTask.ts b/server/queues/tasks/CommentUpdatedNotificationsTask.ts index 91239c1b8..09a3fed45 100644 --- a/server/queues/tasks/CommentUpdatedNotificationsTask.ts +++ b/server/queues/tasks/CommentUpdatedNotificationsTask.ts @@ -6,7 +6,7 @@ import BaseTask, { TaskPriority } from "./BaseTask"; export default class CommentUpdatedNotificationsTask extends BaseTask { public async perform(event: CommentUpdateEvent) { - const newMentionIds = event.data.newMentionIds; + const newMentionIds = event.data?.newMentionIds; if (!newMentionIds) { return; } diff --git a/server/types.ts b/server/types.ts index 9b77db86e..bdecbc31c 100644 --- a/server/types.ts +++ b/server/types.ts @@ -341,8 +341,8 @@ export type CommentUpdateEvent = BaseEvent & { modelId: string; documentId: string; actorId: string; - data: { - newMentionIds?: string[]; + data?: { + newMentionIds: string[]; }; };