From 13ec3366d3d443ecbcf75b30ff7ba0775a3aa658 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 11 May 2023 14:39:49 -0400 Subject: [PATCH] Fix content warning not being removed by edit --- Packages/ComposeUI/Sources/ComposeUI/API/PostService.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Packages/ComposeUI/Sources/ComposeUI/API/PostService.swift b/Packages/ComposeUI/Sources/ComposeUI/API/PostService.swift index 1863238c..94704e38 100644 --- a/Packages/ComposeUI/Sources/ComposeUI/API/PostService.swift +++ b/Packages/ComposeUI/Sources/ComposeUI/API/PostService.swift @@ -26,7 +26,7 @@ class PostService: ObservableObject { } func post() async throws { - guard draft.hasContent else { + guard draft.hasContent || draft.editedStatusID != nil else { return } @@ -35,8 +35,8 @@ class PostService: ObservableObject { let uploadedAttachments = try await uploadAttachments() - let contentWarning = draft.contentWarningEnabled ? draft.contentWarning : nil - let sensitive = contentWarning != nil + let contentWarning = draft.contentWarningEnabled ? draft.contentWarning : "" + let sensitive = !contentWarning.isEmpty let request: Request