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> {
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user