From f81d6f8e24aabe3a4a985c1b0e5bf5eded26d9e4 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Fri, 6 Oct 2023 20:36:28 +0200 Subject: [PATCH] upd: show poll in non-detailed post if poll exists Closes transfem-org/Sharkey#52 --- .../backend/src/server/api/endpoints/notes/conversation.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index b94a019da..bb22ee490 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -86,6 +86,10 @@ export default class extends Endpoint { // eslint- await get(note.replyId); } + if (note.hasPoll) { + return await this.noteEntityService.packMany(conversation, me, { detail: true }); + } + return await this.noteEntityService.packMany(conversation, me); }); }