diff options
author | 2023-06-24 13:59:28 +0200 | |
---|---|---|
committer | 2023-06-24 13:59:28 +0200 | |
commit | 52ebff5e7e6eb91f0c6efe3932628f411cc88ab3 (patch) | |
tree | 657d673e3e35fc1ce260a39721f23d6fc1b0a8f3 | |
parent | [bugfix] Ensure `InReplyToID` set properly, update dereference ancestors func... (diff) | |
download | gotosocial-52ebff5e7e6eb91f0c6efe3932628f411cc88ab3.tar.xz |
[bugfix] Only mark status orphaned on 410 Gone (#1923)
-rw-r--r-- | internal/federation/dereferencing/thread.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/federation/dereferencing/thread.go b/internal/federation/dereferencing/thread.go index a81849e54..ad677b228 100644 --- a/internal/federation/dereferencing/thread.go +++ b/internal/federation/dereferencing/thread.go @@ -168,11 +168,10 @@ func (d *deref) DereferenceStatusAncestors( // useful with the error. For example, HTTP status code returned // from remote may indicate that the parent has been deleted. switch code := gtserror.StatusCode(err); { - case code == http.StatusGone || code == http.StatusNotFound: + case code == http.StatusGone: // 410 means the status has definitely been deleted. - // 404 means the status has *probably* been deleted. // Update this status to reflect that, then bail. - l.Debugf("current status has been orphaned (call to parent returned code %d)", code) + l.Debug("current status has been orphaned (call to parent returned code 410 Gone)") current.InReplyToURI = "" if err := d.state.DB.UpdateStatus( |