mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 17:46:15 -06:00
only check creation date change when an existing status
This commit is contained in:
parent
be69a0ece9
commit
cfa37968f7
1 changed files with 6 additions and 6 deletions
|
|
@ -477,12 +477,6 @@ func (d *Dereferencer) enrichStatus(
|
|||
)
|
||||
}
|
||||
|
||||
// Ensure that status isn't trying to re-date itself.
|
||||
if !latestStatus.CreatedAt.Equal(status.CreatedAt) {
|
||||
err := gtserror.Newf("status %s 'published' changed", uri)
|
||||
return nil, nil, gtserror.SetMalformed(err)
|
||||
}
|
||||
|
||||
// Ensure the final parsed status URI or URL matches
|
||||
// the input URI we fetched (or received) it as.
|
||||
matches, err := util.URIMatches(uri,
|
||||
|
|
@ -511,6 +505,12 @@ func (d *Dereferencer) enrichStatus(
|
|||
latestStatus.ID = id.NewULIDFromTime(latestStatus.CreatedAt)
|
||||
} else {
|
||||
|
||||
// Ensure that status isn't trying to re-date itself.
|
||||
if !latestStatus.CreatedAt.Equal(status.CreatedAt) {
|
||||
err := gtserror.Newf("status %s 'published' changed", uri)
|
||||
return nil, nil, gtserror.SetMalformed(err)
|
||||
}
|
||||
|
||||
// Reuse existing status ID.
|
||||
latestStatus.ID = status.ID
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue