fix: newMentionIds no longer always in event data
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -341,8 +341,8 @@ export type CommentUpdateEvent = BaseEvent<Comment> & {
|
||||
modelId: string;
|
||||
documentId: string;
|
||||
actorId: string;
|
||||
data: {
|
||||
newMentionIds?: string[];
|
||||
data?: {
|
||||
newMentionIds: string[];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user