1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-23 14:46:44 +09:00
This commit is contained in:
NoriDev 2024-11-10 01:14:49 +09:00
parent 43ca7588b1
commit 20eb6d27fc
3 changed files with 2 additions and 8 deletions

View File

@ -28,7 +28,6 @@ import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js'; import type { Config } from '@/config.js';
import { bindThis } from '@/decorators.js'; import { bindThis } from '@/decorators.js';
import { Serialized } from '@/types.js'; import { Serialized } from '@/types.js';
import type { EventSchema } from '@/models/Event.js';
import type Emitter from 'strict-event-emitter-types'; import type Emitter from 'strict-event-emitter-types';
import type { EventEmitter } from 'events'; import type { EventEmitter } from 'events';
@ -127,12 +126,6 @@ export interface NoteEventTypes {
name: string | null; name: string | null;
cw: string | null; cw: string | null;
text: string | null; text: string | null;
event: {
start: Date;
end: Date | null
title: string;
metadata: EventSchema;
}
disableRightClick: boolean | null; disableRightClick: boolean | null;
deleteAt: Date | null; deleteAt: Date | null;
}; };

View File

@ -136,6 +136,7 @@ export class NoteUpdateService implements OnApplicationShutdown {
const values = new MiNote({ const values = new MiNote({
updatedAt: data.updatedAt!, updatedAt: data.updatedAt!,
fileIds: data.files ? data.files.map(file => file.id) : [], fileIds: data.files ? data.files.map(file => file.id) : [],
name: data.name,
text: data.text, text: data.text,
hasPoll: data.poll != null, hasPoll: data.poll != null,
hasEvent: data.event != null, hasEvent: data.event != null,

View File

@ -418,7 +418,6 @@ export class NoteEntityService implements OnModuleInit {
mentions: note.mentions.length > 0 ? note.mentions : undefined, mentions: note.mentions.length > 0 ? note.mentions : undefined,
uri: note.uri ?? undefined, uri: note.uri ?? undefined,
url: note.url ?? undefined, url: note.url ?? undefined,
event: note.hasEvent ? this.populateEvent(note) : undefined,
...(opts.detail ? { ...(opts.detail ? {
clippedCount: note.clippedCount, clippedCount: note.clippedCount,
@ -438,6 +437,7 @@ export class NoteEntityService implements OnModuleInit {
}) : undefined, }) : undefined,
poll: note.hasPoll ? this.populatePoll(note, meId) : undefined, poll: note.hasPoll ? this.populatePoll(note, meId) : undefined,
event: note.hasEvent ? this.populateEvent(note) : undefined,
...(meId && Object.keys(reactions).length > 0 ? { ...(meId && Object.keys(reactions).length > 0 ? {
myReaction: this.populateMyReaction({ myReaction: this.populateMyReaction({