diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-05-09 20:36:14 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-05-09 20:36:14 +0900 |
| commit | bbe26607eb5e5a133a9f98e9d437adbd5286ea28 (patch) | |
| tree | eef9289c3c9e3c5687aa56092a0da91f0bf0c8bb /packages | |
| parent | follow up of 8c2ab25e5f2040fcbc81bc2a02a279fed40e1c11 (diff) | |
| download | misskey-bbe26607eb5e5a133a9f98e9d437adbd5286ea28.tar.gz misskey-bbe26607eb5e5a133a9f98e9d437adbd5286ea28.tar.bz2 misskey-bbe26607eb5e5a133a9f98e9d437adbd5286ea28.zip | |
enhance: リプライ元にアンケートがあることが表示されるように
Resolve #15998
Diffstat (limited to 'packages')
4 files changed, 7 insertions, 0 deletions
diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index 491e63d417..92caad908c 100644 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -429,6 +429,7 @@ export class NoteEntityService implements OnModuleInit { userId: channel.userId, } : undefined, mentions: note.mentions.length > 0 ? note.mentions : undefined, + hasPoll: note.hasPoll || undefined, uri: note.uri ?? undefined, url: note.url ?? undefined, diff --git a/packages/backend/src/models/json-schema/note.ts b/packages/backend/src/models/json-schema/note.ts index 432c096e48..f3901691a4 100644 --- a/packages/backend/src/models/json-schema/note.ts +++ b/packages/backend/src/models/json-schema/note.ts @@ -256,6 +256,10 @@ export const packedNoteSchema = { type: 'number', optional: true, nullable: false, }, + hasPoll: { + type: 'boolean', + optional: true, nullable: false, + }, myReaction: { type: 'string', diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 138df3320c..06b19880d2 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -27,6 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only :emojiUrls="note.emojis" /> </details> + <MkA v-if="note.hasPoll && note.poll == null" :to="`/notes/${note.id}`">({{ i18n.ts.poll }})</MkA> <button v-if="isLong && collapsed" :class="$style.fade" class="_button" @click="collapsed = false"> <span :class="$style.fadeLabel">{{ i18n.ts.showMore }}</span> </button> diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index b2543587cc..91359cffda 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -4481,6 +4481,7 @@ export type components = { url?: string; reactionAndUserPairCache?: string[]; clippedCount?: number; + hasPoll?: boolean; myReaction?: string | null; }; NoteReaction: { |