From a505e51777b73473f7d2cc3d6a052079340929ff Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 25 Sep 2023 21:14:52 +0200 Subject: [PATCH] revert: always get detailed user --- packages/backend/src/core/entities/NoteEntityService.ts | 2 +- packages/megalodon/src/misskey/api_client.ts | 2 +- packages/megalodon/src/misskey/entities/note.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index f4725d8d46..7b54ce5c6d 100644 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -310,7 +310,7 @@ export class NoteEntityService implements OnModuleInit { createdAt: note.createdAt.toISOString(), userId: note.userId, user: this.userEntityService.pack(note.user ?? note.userId, me, { - detail: true, + detail: false, }), text: text, cw: note.cw, diff --git a/packages/megalodon/src/misskey/api_client.ts b/packages/megalodon/src/misskey/api_client.ts index 2388e19801..acfad963db 100644 --- a/packages/megalodon/src/misskey/api_client.ts +++ b/packages/megalodon/src/misskey/api_client.ts @@ -264,7 +264,7 @@ namespace MisskeyAPI { id: n.id, uri: n.uri ? n.uri : host ? `https://${host}/notes/${n.id}` : '', url: n.url ? n.url : host ? `https://${host}/notes/${n.id}` : '', - account: userDetail(n.user, n.user.host ? n.user.host : host ? host : null), + account: user(n.user, n.user.host ? n.user.host : host ? host : null), in_reply_to_id: n.replyId, in_reply_to_account_id: n.reply?.userId ?? null, reblog: n.renote ? note(n.renote, n.user.host ? n.user.host : host ? host : null) : null, diff --git a/packages/megalodon/src/misskey/entities/note.ts b/packages/megalodon/src/misskey/entities/note.ts index ef5f19d0ab..08c5f10aea 100644 --- a/packages/megalodon/src/misskey/entities/note.ts +++ b/packages/megalodon/src/misskey/entities/note.ts @@ -8,7 +8,7 @@ namespace MisskeyEntity { id: string createdAt: string userId: string - user: UserDetail + user: User text: string | null cw: string | null visibility: 'public' | 'home' | 'followers' | 'specified'