Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Fix:空文字を投稿しようとすると投稿できなくなる #894

Merged
merged 4 commits into from
Apr 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/js/post/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export async function post(postVis?: IVis, dry?: boolean) {
if (reply) toot.in_reply_to_id = reply.toString()
const media = $('#media').val()?.toString()
if (media) toot.media_ids = media.split(',')
if (media && !str) return
const quote = $('#quote').val()?.toString()
if (quote) toot.quote_id = quote
if ($('#nsfw').hasClass('nsfw-avail')) toot.sensitive = true
Expand Down Expand Up @@ -157,9 +158,9 @@ export async function post(postVis?: IVis, dry?: boolean) {
clear()
} catch (e: any) {
console.error(e)
$('#ideKey').val('')
$('.toot-btn-group').prop('disabled', false)
if (media && e === 422) {
$('#ideKey').val('')
$('.toot-btn-group').prop('disabled', false)
alertProcessUnfinished()
return
}
Expand Down