From 882d07db5f21b007f6c1ece4516c62c97536dfe7 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 15 Sep 2025 18:28:48 +0200 Subject: [bugfix] API status edit history returned in inverse order (#4432) Simply reverses the order in which we build status edit history for the frontend. In fact now it matches how we store it in the database which is even easier :p. Why I thought it needed to be returned inverse to begin with? Who knows. closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4426 (thank you [@DarkCat09](https://codeberg.org/DarkCat09) for pointing it out!) Co-authored-by: tobi Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4432 Co-authored-by: kim Co-committed-by: kim --- internal/gtsmodel/status.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/gtsmodel/status.go') diff --git a/internal/gtsmodel/status.go b/internal/gtsmodel/status.go index 78aa09dd9..31e8fe881 100644 --- a/internal/gtsmodel/status.go +++ b/internal/gtsmodel/status.go @@ -58,8 +58,8 @@ type Status struct { BoostOf *Status `bun:"-"` // status that corresponds to boostOfID BoostOfAccount *Account `bun:"rel:belongs-to"` // account that corresponds to boostOfAccountID ThreadID string `bun:"type:CHAR(26),nullzero,notnull,default:00000000000000000000000000"` // id of the thread to which this status belongs - EditIDs []string `bun:"edits,array"` // - Edits []*StatusEdit `bun:"-"` // + EditIDs []string `bun:"edits,array"` // IDs of status edits for this status, ordered from smallest (oldest) -> largest (newest) ID. + Edits []*StatusEdit `bun:"-"` // Edits of this status, ordered from oldest -> newest edit. PollID string `bun:"type:CHAR(26),nullzero"` // Poll *Poll `bun:"-"` // ContentWarning string `bun:",nullzero"` // Content warning HTML for this status. -- cgit v1.2.3