mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 15:52:26 -05:00
[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 <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4432 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
d9ee6cddea
commit
882d07db5f
5 changed files with 226 additions and 117 deletions
|
|
@ -96,8 +96,8 @@ func (s *statusEditDB) GetStatusEditsByIDs(ctx context.Context, ids []string) ([
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reorder the edits by their
|
// Reorder the edits by their IDs to ensure in correct
|
||||||
// IDs to ensure in correct order.
|
// order (ID ascending, ie., latest to oldest edit).
|
||||||
getID := func(e *gtsmodel.StatusEdit) string { return e.ID }
|
getID := func(e *gtsmodel.StatusEdit) string { return e.ID }
|
||||||
xslices.OrderBy(edits, ids, getID)
|
xslices.OrderBy(edits, ids, getID)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,8 @@ type Status struct {
|
||||||
BoostOf *Status `bun:"-"` // status that corresponds to boostOfID
|
BoostOf *Status `bun:"-"` // status that corresponds to boostOfID
|
||||||
BoostOfAccount *Account `bun:"rel:belongs-to"` // account that corresponds to boostOfAccountID
|
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
|
ThreadID string `bun:"type:CHAR(26),nullzero,notnull,default:00000000000000000000000000"` // id of the thread to which this status belongs
|
||||||
EditIDs []string `bun:"edits,array"` //
|
EditIDs []string `bun:"edits,array"` // IDs of status edits for this status, ordered from smallest (oldest) -> largest (newest) ID.
|
||||||
Edits []*StatusEdit `bun:"-"` //
|
Edits []*StatusEdit `bun:"-"` // Edits of this status, ordered from oldest -> newest edit.
|
||||||
PollID string `bun:"type:CHAR(26),nullzero"` //
|
PollID string `bun:"type:CHAR(26),nullzero"` //
|
||||||
Poll *Poll `bun:"-"` //
|
Poll *Poll `bun:"-"` //
|
||||||
ContentWarning string `bun:",nullzero"` // Content warning HTML for this status.
|
ContentWarning string `bun:",nullzero"` // Content warning HTML for this status.
|
||||||
|
|
|
||||||
|
|
@ -375,13 +375,13 @@ func (p *Processor) HistoryGet(ctx context.Context, requester *gtsmodel.Account,
|
||||||
return nil, gtserror.NewErrorInternalError(err)
|
return nil, gtserror.NewErrorInternalError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
edits, err := p.converter.StatusToAPIEdits(ctx, target)
|
editHistory, err := p.converter.StatusToEditHistory(ctx, target)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err := gtserror.Newf("error converting status edits: %w", err)
|
err := gtserror.Newf("error converting status edits: %w", err)
|
||||||
return nil, gtserror.NewErrorInternalError(err)
|
return nil, gtserror.NewErrorInternalError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return edits, nil
|
return editHistory, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Processor) processMediaEdits(
|
func (p *Processor) processMediaEdits(
|
||||||
|
|
|
||||||
|
|
@ -1061,14 +1061,17 @@ func (c *Converter) StatusToWebStatus(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure to include latest revision.
|
// End with latest revision.
|
||||||
webStatus.EditTimeline = append(
|
webStatus.EditTimeline = append(
|
||||||
webStatus.EditTimeline,
|
webStatus.EditTimeline,
|
||||||
*webStatus.EditedAt,
|
*webStatus.EditedAt,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Sort the slice so it goes from
|
// Reverse the slice so that instead of going
|
||||||
// newest -> oldest, like a timeline.
|
// from oldest (original status) to newest
|
||||||
|
// (latest revision), it goes from newest
|
||||||
|
// to oldest, like a timeline, to make
|
||||||
|
// things easier when web templating.
|
||||||
//
|
//
|
||||||
// It'll look something like:
|
// It'll look something like:
|
||||||
//
|
//
|
||||||
|
|
@ -1344,8 +1347,13 @@ func (c *Converter) baseStatusToFrontend(
|
||||||
return apiStatus, nil
|
return apiStatus, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// StatusToAPIEdits converts a status and its historical edits (if any) to a slice of API model status edits.
|
// StatusToEditHistory converts a status and its historical edits
|
||||||
func (c *Converter) StatusToAPIEdits(ctx context.Context, status *gtsmodel.Status) ([]*apimodel.StatusEdit, error) {
|
// (if any) to a slice of API model status edits, ordered from original
|
||||||
|
// status at index 0 to latest revision at index len(slice)-1.
|
||||||
|
func (c *Converter) StatusToEditHistory(
|
||||||
|
ctx context.Context,
|
||||||
|
status *gtsmodel.Status,
|
||||||
|
) ([]*apimodel.StatusEdit, error) {
|
||||||
var media map[string]*gtsmodel.MediaAttachment
|
var media map[string]*gtsmodel.MediaAttachment
|
||||||
|
|
||||||
// Gather attachments of status AND edits.
|
// Gather attachments of status AND edits.
|
||||||
|
|
@ -1397,8 +1405,11 @@ func (c *Converter) StatusToAPIEdits(ctx context.Context, status *gtsmodel.Statu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append status itself to final slot in the edits
|
// Append *current* version of the status to last slot
|
||||||
// so we can add its revision using the below loop.
|
// in the edits so we can add it at the bottom as latest
|
||||||
|
// revision using the below loop. Note: a new slice is
|
||||||
|
// created here with the append, to avoid modifying
|
||||||
|
// Edits on the status pointer.
|
||||||
edits := append(status.Edits, >smodel.StatusEdit{ //nolint:gocritic
|
edits := append(status.Edits, >smodel.StatusEdit{ //nolint:gocritic
|
||||||
Content: status.Content,
|
Content: status.Content,
|
||||||
ContentWarning: status.ContentWarning,
|
ContentWarning: status.ContentWarning,
|
||||||
|
|
@ -1410,10 +1421,13 @@ func (c *Converter) StatusToAPIEdits(ctx context.Context, status *gtsmodel.Statu
|
||||||
CreatedAt: status.UpdatedAt(), // falls back to creation
|
CreatedAt: status.UpdatedAt(), // falls back to creation
|
||||||
})
|
})
|
||||||
|
|
||||||
// Iterate through status edits, starting at newest.
|
// Iterate through status revisions, starting at original
|
||||||
apiEdits := make([]*apimodel.StatusEdit, 0, len(edits))
|
// status when it was created (ie., oldest revision).
|
||||||
for i := len(edits) - 1; i >= 0; i-- {
|
//
|
||||||
edit := edits[i]
|
// This creates a slice of revisions that goes from
|
||||||
|
// oldest (original status) to newest (latest revision).
|
||||||
|
editHistory := make([]*apimodel.StatusEdit, 0, len(edits))
|
||||||
|
for _, edit := range edits {
|
||||||
|
|
||||||
// Iterate through edit attachment IDs, getting model from 'media' lookup.
|
// Iterate through edit attachment IDs, getting model from 'media' lookup.
|
||||||
apiAttachments := make([]*apimodel.Attachment, 0, len(edit.AttachmentIDs))
|
apiAttachments := make([]*apimodel.Attachment, 0, len(edit.AttachmentIDs))
|
||||||
|
|
@ -1472,7 +1486,7 @@ func (c *Converter) StatusToAPIEdits(ctx context.Context, status *gtsmodel.Statu
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append this status edit to the return slice.
|
// Append this status edit to the return slice.
|
||||||
apiEdits = append(apiEdits, &apimodel.StatusEdit{
|
editHistory = append(editHistory, &apimodel.StatusEdit{
|
||||||
CreatedAt: util.FormatISO8601(edit.CreatedAt),
|
CreatedAt: util.FormatISO8601(edit.CreatedAt),
|
||||||
Content: edit.Content,
|
Content: edit.Content,
|
||||||
SpoilerText: edit.ContentWarning,
|
SpoilerText: edit.ContentWarning,
|
||||||
|
|
@ -1484,7 +1498,7 @@ func (c *Converter) StatusToAPIEdits(ctx context.Context, status *gtsmodel.Statu
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiEdits, nil
|
return editHistory, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// VisToAPIVis converts a gts visibility into its api equivalent
|
// VisToAPIVis converts a gts visibility into its api equivalent
|
||||||
|
|
|
||||||
|
|
@ -3671,7 +3671,7 @@ func (suite *InternalToFrontendTestSuite) TestStatusToAPIEdits() {
|
||||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||||
defer cncl()
|
defer cncl()
|
||||||
|
|
||||||
statusID := suite.testStatuses["local_account_1_status_9"].ID
|
statusID := suite.testStatuses["local_account_2_status_9"].ID
|
||||||
|
|
||||||
status, err := suite.state.DB.GetStatusByID(ctx, statusID)
|
status, err := suite.state.DB.GetStatusByID(ctx, statusID)
|
||||||
suite.NoError(err)
|
suite.NoError(err)
|
||||||
|
|
@ -3679,123 +3679,218 @@ func (suite *InternalToFrontendTestSuite) TestStatusToAPIEdits() {
|
||||||
err = suite.state.DB.PopulateStatusEdits(ctx, status)
|
err = suite.state.DB.PopulateStatusEdits(ctx, status)
|
||||||
suite.NoError(err)
|
suite.NoError(err)
|
||||||
|
|
||||||
apiEdits, err := suite.typeconverter.StatusToAPIEdits(ctx, status)
|
apiEdits, err := suite.typeconverter.StatusToEditHistory(ctx, status)
|
||||||
suite.NoError(err)
|
suite.NoError(err)
|
||||||
|
|
||||||
b, err := json.MarshalIndent(apiEdits, "", " ")
|
b, err := json.MarshalIndent(apiEdits, "", " ")
|
||||||
suite.NoError(err)
|
suite.NoError(err)
|
||||||
|
|
||||||
suite.Equal(`[
|
suite.Equal(`[
|
||||||
{
|
|
||||||
"content": "\u003cp\u003ethis is the latest revision of the status, with a content-warning\u003c/p\u003e",
|
|
||||||
"spoiler_text": "edited status",
|
|
||||||
"sensitive": false,
|
|
||||||
"created_at": "2024-11-01T09:02:00.000Z",
|
|
||||||
"account": {
|
|
||||||
"id": "01F8MH1H7YV1Z7D2C8K2730QBF",
|
|
||||||
"username": "the_mighty_zork",
|
|
||||||
"acct": "the_mighty_zork",
|
|
||||||
"display_name": "original zork (he/they)",
|
|
||||||
"locked": false,
|
|
||||||
"discoverable": true,
|
|
||||||
"bot": false,
|
|
||||||
"created_at": "2022-05-20T11:09:18.000Z",
|
|
||||||
"note": "\u003cp\u003ehey yo this is my profile!\u003c/p\u003e",
|
|
||||||
"url": "http://localhost:8080/@the_mighty_zork",
|
|
||||||
"avatar": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/original/01F8MH58A357CV5K7R7TJMSH6S.jpg",
|
|
||||||
"avatar_static": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/small/01F8MH58A357CV5K7R7TJMSH6S.webp",
|
|
||||||
"avatar_description": "a green goblin looking nasty",
|
|
||||||
"avatar_media_id": "01F8MH58A357CV5K7R7TJMSH6S",
|
|
||||||
"header": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/original/01PFPMWK2FF0D9WMHEJHR07C3Q.jpg",
|
|
||||||
"header_static": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/small/01PFPMWK2FF0D9WMHEJHR07C3Q.webp",
|
|
||||||
"header_description": "A very old-school screenshot of the original team fortress mod for quake",
|
|
||||||
"header_media_id": "01PFPMWK2FF0D9WMHEJHR07C3Q",
|
|
||||||
"followers_count": 2,
|
|
||||||
"following_count": 2,
|
|
||||||
"statuses_count": 9,
|
|
||||||
"last_status_at": "2024-11-01",
|
|
||||||
"emojis": [],
|
|
||||||
"fields": [],
|
|
||||||
"enable_rss": true,
|
|
||||||
"group": false
|
|
||||||
},
|
|
||||||
"poll": null,
|
|
||||||
"media_attachments": [],
|
|
||||||
"emojis": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"content": "\u003cp\u003ethis is the first status edit! now with content-warning\u003c/p\u003e",
|
|
||||||
"spoiler_text": "edited status",
|
|
||||||
"sensitive": false,
|
|
||||||
"created_at": "2024-11-01T09:01:00.000Z",
|
|
||||||
"account": {
|
|
||||||
"id": "01F8MH1H7YV1Z7D2C8K2730QBF",
|
|
||||||
"username": "the_mighty_zork",
|
|
||||||
"acct": "the_mighty_zork",
|
|
||||||
"display_name": "original zork (he/they)",
|
|
||||||
"locked": false,
|
|
||||||
"discoverable": true,
|
|
||||||
"bot": false,
|
|
||||||
"created_at": "2022-05-20T11:09:18.000Z",
|
|
||||||
"note": "\u003cp\u003ehey yo this is my profile!\u003c/p\u003e",
|
|
||||||
"url": "http://localhost:8080/@the_mighty_zork",
|
|
||||||
"avatar": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/original/01F8MH58A357CV5K7R7TJMSH6S.jpg",
|
|
||||||
"avatar_static": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/small/01F8MH58A357CV5K7R7TJMSH6S.webp",
|
|
||||||
"avatar_description": "a green goblin looking nasty",
|
|
||||||
"avatar_media_id": "01F8MH58A357CV5K7R7TJMSH6S",
|
|
||||||
"header": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/original/01PFPMWK2FF0D9WMHEJHR07C3Q.jpg",
|
|
||||||
"header_static": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/small/01PFPMWK2FF0D9WMHEJHR07C3Q.webp",
|
|
||||||
"header_description": "A very old-school screenshot of the original team fortress mod for quake",
|
|
||||||
"header_media_id": "01PFPMWK2FF0D9WMHEJHR07C3Q",
|
|
||||||
"followers_count": 2,
|
|
||||||
"following_count": 2,
|
|
||||||
"statuses_count": 9,
|
|
||||||
"last_status_at": "2024-11-01",
|
|
||||||
"emojis": [],
|
|
||||||
"fields": [],
|
|
||||||
"enable_rss": true,
|
|
||||||
"group": false
|
|
||||||
},
|
|
||||||
"poll": null,
|
|
||||||
"media_attachments": [],
|
|
||||||
"emojis": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"content": "\u003cp\u003ethis is the original status\u003c/p\u003e",
|
"content": "\u003cp\u003ethis is the original status\u003c/p\u003e",
|
||||||
"spoiler_text": "",
|
"spoiler_text": "",
|
||||||
"sensitive": false,
|
"sensitive": false,
|
||||||
"created_at": "2024-11-01T09:00:00.000Z",
|
"created_at": "2024-11-01T08:00:00.000Z",
|
||||||
"account": {
|
"account": {
|
||||||
"id": "01F8MH1H7YV1Z7D2C8K2730QBF",
|
"id": "01F8MH5NBDF2MV7CTC4Q5128HF",
|
||||||
"username": "the_mighty_zork",
|
"username": "1happyturtle",
|
||||||
"acct": "the_mighty_zork",
|
"acct": "1happyturtle",
|
||||||
"display_name": "original zork (he/they)",
|
"display_name": "happy little turtle :3",
|
||||||
"locked": false,
|
"locked": true,
|
||||||
"discoverable": true,
|
"discoverable": false,
|
||||||
"bot": false,
|
"bot": false,
|
||||||
"created_at": "2022-05-20T11:09:18.000Z",
|
"created_at": "2022-06-04T13:12:00.000Z",
|
||||||
"note": "\u003cp\u003ehey yo this is my profile!\u003c/p\u003e",
|
"note": "\u003cp\u003ei post about things that concern me\u003c/p\u003e",
|
||||||
"url": "http://localhost:8080/@the_mighty_zork",
|
"url": "http://localhost:8080/@1happyturtle",
|
||||||
"avatar": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/original/01F8MH58A357CV5K7R7TJMSH6S.jpg",
|
"avatar": "",
|
||||||
"avatar_static": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/small/01F8MH58A357CV5K7R7TJMSH6S.webp",
|
"avatar_static": "",
|
||||||
"avatar_description": "a green goblin looking nasty",
|
"header": "http://localhost:8080/assets/default_header.webp",
|
||||||
"avatar_media_id": "01F8MH58A357CV5K7R7TJMSH6S",
|
"header_static": "http://localhost:8080/assets/default_header.webp",
|
||||||
"header": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/original/01PFPMWK2FF0D9WMHEJHR07C3Q.jpg",
|
"header_description": "Flat gray background (default header).",
|
||||||
"header_static": "http://localhost:8080/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/small/01PFPMWK2FF0D9WMHEJHR07C3Q.webp",
|
"followers_count": 1,
|
||||||
"header_description": "A very old-school screenshot of the original team fortress mod for quake",
|
"following_count": 1,
|
||||||
"header_media_id": "01PFPMWK2FF0D9WMHEJHR07C3Q",
|
|
||||||
"followers_count": 2,
|
|
||||||
"following_count": 2,
|
|
||||||
"statuses_count": 9,
|
"statuses_count": 9,
|
||||||
"last_status_at": "2024-11-01",
|
"last_status_at": "2024-11-01",
|
||||||
"emojis": [],
|
"emojis": [],
|
||||||
"fields": [],
|
"fields": [
|
||||||
"enable_rss": true,
|
{
|
||||||
|
"name": "should you follow me?",
|
||||||
|
"value": "maybe!",
|
||||||
|
"verified_at": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "age",
|
||||||
|
"value": "120",
|
||||||
|
"verified_at": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hide_collections": true,
|
||||||
"group": false
|
"group": false
|
||||||
},
|
},
|
||||||
"poll": null,
|
"poll": null,
|
||||||
"media_attachments": [],
|
"media_attachments": [],
|
||||||
"emojis": []
|
"emojis": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"content": "\u003cp\u003enow edited to have some media!\u003c/p\u003e",
|
||||||
|
"spoiler_text": "edit with media attachments",
|
||||||
|
"sensitive": true,
|
||||||
|
"created_at": "2024-11-01T08:01:00.000Z",
|
||||||
|
"account": {
|
||||||
|
"id": "01F8MH5NBDF2MV7CTC4Q5128HF",
|
||||||
|
"username": "1happyturtle",
|
||||||
|
"acct": "1happyturtle",
|
||||||
|
"display_name": "happy little turtle :3",
|
||||||
|
"locked": true,
|
||||||
|
"discoverable": false,
|
||||||
|
"bot": false,
|
||||||
|
"created_at": "2022-06-04T13:12:00.000Z",
|
||||||
|
"note": "\u003cp\u003ei post about things that concern me\u003c/p\u003e",
|
||||||
|
"url": "http://localhost:8080/@1happyturtle",
|
||||||
|
"avatar": "",
|
||||||
|
"avatar_static": "",
|
||||||
|
"header": "http://localhost:8080/assets/default_header.webp",
|
||||||
|
"header_static": "http://localhost:8080/assets/default_header.webp",
|
||||||
|
"header_description": "Flat gray background (default header).",
|
||||||
|
"followers_count": 1,
|
||||||
|
"following_count": 1,
|
||||||
|
"statuses_count": 9,
|
||||||
|
"last_status_at": "2024-11-01",
|
||||||
|
"emojis": [],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "should you follow me?",
|
||||||
|
"value": "maybe!",
|
||||||
|
"verified_at": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "age",
|
||||||
|
"value": "120",
|
||||||
|
"verified_at": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hide_collections": true,
|
||||||
|
"group": false
|
||||||
|
},
|
||||||
|
"poll": null,
|
||||||
|
"media_attachments": [
|
||||||
|
{
|
||||||
|
"id": "01JDQ164HM08SGJ7ZEK9003Z4B",
|
||||||
|
"type": "unknown",
|
||||||
|
"url": null,
|
||||||
|
"text_url": null,
|
||||||
|
"preview_url": null,
|
||||||
|
"remote_url": "http://example.org/fileserver/01HE7Y659ZWZ02JM4AWYJZ176Q/attachment/original/01HE892Y8ZS68TQCNPX7J888P3.mp3",
|
||||||
|
"preview_remote_url": null,
|
||||||
|
"meta": null,
|
||||||
|
"description": "Jolly salsa song, public domain.",
|
||||||
|
"blurhash": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"emojis": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"content": "\u003cp\u003enow edited to remove the media\u003c/p\u003e",
|
||||||
|
"spoiler_text": "edit missing previous media attachments",
|
||||||
|
"sensitive": false,
|
||||||
|
"created_at": "2024-11-01T08:02:00.000Z",
|
||||||
|
"account": {
|
||||||
|
"id": "01F8MH5NBDF2MV7CTC4Q5128HF",
|
||||||
|
"username": "1happyturtle",
|
||||||
|
"acct": "1happyturtle",
|
||||||
|
"display_name": "happy little turtle :3",
|
||||||
|
"locked": true,
|
||||||
|
"discoverable": false,
|
||||||
|
"bot": false,
|
||||||
|
"created_at": "2022-06-04T13:12:00.000Z",
|
||||||
|
"note": "\u003cp\u003ei post about things that concern me\u003c/p\u003e",
|
||||||
|
"url": "http://localhost:8080/@1happyturtle",
|
||||||
|
"avatar": "",
|
||||||
|
"avatar_static": "",
|
||||||
|
"header": "http://localhost:8080/assets/default_header.webp",
|
||||||
|
"header_static": "http://localhost:8080/assets/default_header.webp",
|
||||||
|
"header_description": "Flat gray background (default header).",
|
||||||
|
"followers_count": 1,
|
||||||
|
"following_count": 1,
|
||||||
|
"statuses_count": 9,
|
||||||
|
"last_status_at": "2024-11-01",
|
||||||
|
"emojis": [],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "should you follow me?",
|
||||||
|
"value": "maybe!",
|
||||||
|
"verified_at": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "age",
|
||||||
|
"value": "120",
|
||||||
|
"verified_at": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hide_collections": true,
|
||||||
|
"group": false
|
||||||
|
},
|
||||||
|
"poll": null,
|
||||||
|
"media_attachments": [],
|
||||||
|
"emojis": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"content": "\u003cp\u003enow edited to bring back the previous edit's media!\u003c/p\u003e",
|
||||||
|
"spoiler_text": "edit with media attachments",
|
||||||
|
"sensitive": false,
|
||||||
|
"created_at": "2024-11-01T08:03:00.000Z",
|
||||||
|
"account": {
|
||||||
|
"id": "01F8MH5NBDF2MV7CTC4Q5128HF",
|
||||||
|
"username": "1happyturtle",
|
||||||
|
"acct": "1happyturtle",
|
||||||
|
"display_name": "happy little turtle :3",
|
||||||
|
"locked": true,
|
||||||
|
"discoverable": false,
|
||||||
|
"bot": false,
|
||||||
|
"created_at": "2022-06-04T13:12:00.000Z",
|
||||||
|
"note": "\u003cp\u003ei post about things that concern me\u003c/p\u003e",
|
||||||
|
"url": "http://localhost:8080/@1happyturtle",
|
||||||
|
"avatar": "",
|
||||||
|
"avatar_static": "",
|
||||||
|
"header": "http://localhost:8080/assets/default_header.webp",
|
||||||
|
"header_static": "http://localhost:8080/assets/default_header.webp",
|
||||||
|
"header_description": "Flat gray background (default header).",
|
||||||
|
"followers_count": 1,
|
||||||
|
"following_count": 1,
|
||||||
|
"statuses_count": 9,
|
||||||
|
"last_status_at": "2024-11-01",
|
||||||
|
"emojis": [],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "should you follow me?",
|
||||||
|
"value": "maybe!",
|
||||||
|
"verified_at": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "age",
|
||||||
|
"value": "120",
|
||||||
|
"verified_at": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hide_collections": true,
|
||||||
|
"group": false
|
||||||
|
},
|
||||||
|
"poll": null,
|
||||||
|
"media_attachments": [
|
||||||
|
{
|
||||||
|
"id": "01JDQ164HM08SGJ7ZEK9003Z4B",
|
||||||
|
"type": "unknown",
|
||||||
|
"url": null,
|
||||||
|
"text_url": null,
|
||||||
|
"preview_url": null,
|
||||||
|
"remote_url": "http://example.org/fileserver/01HE7Y659ZWZ02JM4AWYJZ176Q/attachment/original/01HE892Y8ZS68TQCNPX7J888P3.mp3",
|
||||||
|
"preview_remote_url": null,
|
||||||
|
"meta": null,
|
||||||
|
"description": "Jolly salsa song, public domain.",
|
||||||
|
"blurhash": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"emojis": []
|
||||||
}
|
}
|
||||||
]`, string(b))
|
]`, string(b))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue