mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-03 12:03:17 -06:00
add edited_at field to apimodel status
This commit is contained in:
parent
8bee4508a5
commit
db3f6687ed
9 changed files with 37 additions and 11 deletions
|
|
@ -1399,17 +1399,13 @@ func (c *Converter) baseStatusToFrontend(
|
|||
}
|
||||
|
||||
// Nullable fields.
|
||||
if s.InReplyToID != "" {
|
||||
apiStatus.InReplyToID = util.Ptr(s.InReplyToID)
|
||||
}
|
||||
|
||||
if s.InReplyToAccountID != "" {
|
||||
apiStatus.InReplyToAccountID = util.Ptr(s.InReplyToAccountID)
|
||||
}
|
||||
|
||||
if s.Language != "" {
|
||||
apiStatus.Language = util.Ptr(s.Language)
|
||||
if !s.UpdatedAt.Equal(s.CreatedAt) {
|
||||
timestamp := util.FormatISO8601(s.UpdatedAt)
|
||||
apiStatus.EditedAt = util.Ptr(timestamp)
|
||||
}
|
||||
apiStatus.InReplyToID = util.PtrIf(s.InReplyToID)
|
||||
apiStatus.InReplyToAccountID = util.PtrIf(s.InReplyToAccountID)
|
||||
apiStatus.Language = util.PtrIf(s.Language)
|
||||
|
||||
if app := s.CreatedWithApplication; app != nil {
|
||||
apiStatus.Application, err = c.AppToAPIAppPublic(ctx, app)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue