diff options
author | 2022-06-24 17:17:40 +0200 | |
---|---|---|
committer | 2022-06-24 17:17:40 +0200 | |
commit | 0846b76e9343fd90a33f5a8864f39cf071d3841e (patch) | |
tree | f5bc3b506cd87b09a46d6f17982c3633c909b14f /internal/processing/fromclientapi.go | |
parent | [bugfix] allow setting empty email via instance patch (#665) (diff) | |
download | gotosocial-0846b76e9343fd90a33f5a8864f39cf071d3841e.tar.xz |
[bugfix] Fix 404 on status delete redraft (#668)
* add unattach function to media processor
* call delete or unattach appropriately
unattach from client api, delete from federated api
* typo fix
Diffstat (limited to 'internal/processing/fromclientapi.go')
-rw-r--r-- | internal/processing/fromclientapi.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/processing/fromclientapi.go b/internal/processing/fromclientapi.go index 13be84305..24465a059 100644 --- a/internal/processing/fromclientapi.go +++ b/internal/processing/fromclientapi.go @@ -284,7 +284,12 @@ func (p *processor) processDeleteStatusFromClientAPI(ctx context.Context, client statusToDelete.Account = clientMsg.OriginAccount } - if err := p.wipeStatus(ctx, statusToDelete); err != nil { + // don't delete attachments, just unattach them; + // since this request comes from the client API + // and the poster might want to use the attachments + // again in a new post + deleteAttachments := false + if err := p.wipeStatus(ctx, statusToDelete, deleteAttachments); err != nil { return err } |