client: check quoteId for canPost computation

fixes FoundKeyGang/FoundKey#334

Changelog: Fixed
This commit is contained in:
Johann150 2023-02-03 23:12:12 +01:00
parent ca257d7d0c
commit a45908c1cb
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -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,