diff --git a/packages/backend/src/core/GlobalEventService.ts b/packages/backend/src/core/GlobalEventService.ts index 6d04008576..dadf0758d5 100644 --- a/packages/backend/src/core/GlobalEventService.ts +++ b/packages/backend/src/core/GlobalEventService.ts @@ -28,7 +28,6 @@ import { DI } from '@/di-symbols.js'; import type { Config } from '@/config.js'; import { bindThis } from '@/decorators.js'; import { Serialized } from '@/types.js'; -import type { EventSchema } from '@/models/Event.js'; import type Emitter from 'strict-event-emitter-types'; import type { EventEmitter } from 'events'; @@ -127,12 +126,6 @@ export interface NoteEventTypes { name: string | null; cw: string | null; text: string | null; - event: { - start: Date; - end: Date | null - title: string; - metadata: EventSchema; - } disableRightClick: boolean | null; deleteAt: Date | null; }; diff --git a/packages/backend/src/core/NoteUpdateService.ts b/packages/backend/src/core/NoteUpdateService.ts index d3397d533f..092cfb142c 100644 --- a/packages/backend/src/core/NoteUpdateService.ts +++ b/packages/backend/src/core/NoteUpdateService.ts @@ -136,6 +136,7 @@ export class NoteUpdateService implements OnApplicationShutdown { const values = new MiNote({ updatedAt: data.updatedAt!, fileIds: data.files ? data.files.map(file => file.id) : [], + name: data.name, text: data.text, hasPoll: data.poll != null, hasEvent: data.event != null, diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index 263051d44e..bdb10e95f8 100644 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -418,7 +418,6 @@ export class NoteEntityService implements OnModuleInit { mentions: note.mentions.length > 0 ? note.mentions : undefined, uri: note.uri ?? undefined, url: note.url ?? undefined, - event: note.hasEvent ? this.populateEvent(note) : undefined, ...(opts.detail ? { clippedCount: note.clippedCount, @@ -438,6 +437,7 @@ export class NoteEntityService implements OnModuleInit { }) : undefined, poll: note.hasPoll ? this.populatePoll(note, meId) : undefined, + event: note.hasEvent ? this.populateEvent(note) : undefined, ...(meId && Object.keys(reactions).length > 0 ? { myReaction: this.populateMyReaction({