mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-23 10:42:12 +00:00
[bugfix] Only mark status orphaned on 410 Gone (#1923)
This commit is contained in:
parent
3e19f480e6
commit
52ebff5e7e
|
@ -168,11 +168,10 @@ func (d *deref) DereferenceStatusAncestors(
|
||||||
// useful with the error. For example, HTTP status code returned
|
// useful with the error. For example, HTTP status code returned
|
||||||
// from remote may indicate that the parent has been deleted.
|
// from remote may indicate that the parent has been deleted.
|
||||||
switch code := gtserror.StatusCode(err); {
|
switch code := gtserror.StatusCode(err); {
|
||||||
case code == http.StatusGone || code == http.StatusNotFound:
|
case code == http.StatusGone:
|
||||||
// 410 means the status has definitely been deleted.
|
// 410 means the status has definitely been deleted.
|
||||||
// 404 means the status has *probably* been deleted.
|
|
||||||
// Update this status to reflect that, then bail.
|
// 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 = ""
|
current.InReplyToURI = ""
|
||||||
if err := d.state.DB.UpdateStatus(
|
if err := d.state.DB.UpdateStatus(
|
||||||
|
|
Loading…
Reference in a new issue