mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 00:36:14 -06:00
ensure edited_at isn't set on boost wrapper statuses
This commit is contained in:
parent
fe8d5f2307
commit
bc4c86ee6f
1 changed files with 4 additions and 2 deletions
|
|
@ -1383,11 +1383,13 @@ func (c *Converter) baseStatusToFrontend(
|
||||||
InteractionPolicy: *apiInteractionPolicy,
|
InteractionPolicy: *apiInteractionPolicy,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nullable fields.
|
// Only set edited_at if this is a non-boost-wrapper
|
||||||
if !s.UpdatedAt.Equal(s.CreatedAt) {
|
// with an updated_at date different to creation date.
|
||||||
|
if !s.UpdatedAt.Equal(s.CreatedAt) && s.BoostOfID == "" {
|
||||||
timestamp := util.FormatISO8601(s.UpdatedAt)
|
timestamp := util.FormatISO8601(s.UpdatedAt)
|
||||||
apiStatus.EditedAt = util.Ptr(timestamp)
|
apiStatus.EditedAt = util.Ptr(timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
apiStatus.InReplyToID = util.PtrIf(s.InReplyToID)
|
apiStatus.InReplyToID = util.PtrIf(s.InReplyToID)
|
||||||
apiStatus.InReplyToAccountID = util.PtrIf(s.InReplyToAccountID)
|
apiStatus.InReplyToAccountID = util.PtrIf(s.InReplyToAccountID)
|
||||||
apiStatus.Language = util.PtrIf(s.Language)
|
apiStatus.Language = util.PtrIf(s.Language)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue