From a45908c1cbfb5049c8593f68c2bf52299d0cc58f Mon Sep 17 00:00:00 2001 From: Johann150 Date: Fri, 3 Feb 2023 23:12:12 +0100 Subject: [PATCH] client: check quoteId for canPost computation fixes https://akkoma.dev/FoundKeyGang/FoundKey/issues/334 Changelog: Fixed --- packages/client/src/components/post-form.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/post-form.vue b/packages/client/src/components/post-form.vue index d929d8d32..3d5434096 100644 --- a/packages/client/src/components/post-form.vue +++ b/packages/client/src/components/post-form.vue @@ -207,7 +207,7 @@ const maxTextLength = $computed((): number => { const canPost = $computed((): boolean => { return !posting && - (1 <= textLength || 1 <= files.length || !!poll || !!props.renote) && + (1 <= textLength || 1 <= files.length || !!poll || !!props.renote || !!quoteId) && (textLength <= maxTextLength) && (!poll || poll.choices.length >= 2); }); @@ -573,7 +573,7 @@ async function post() { text: text === '' ? undefined : text, fileIds: files.length > 0 ? files.map(f => f.id) : undefined, replyId: props.reply ? props.reply.id : undefined, - renoteId: props.renote ? props.renote.id : quoteId ? quoteId : undefined, + renoteId: props.renote?.id ?? quoteId ?? undefined, channelId: props.channel ? props.channel.id : undefined, poll, cw: useCw ? cw || '' : undefined,