[bug] Add missing group property to the Account model (#3746)

* Stub out account's Group parameter

* Fix typo in Contributing documentation

* Update swagger and match style

* Update the swagger command to mimic test/swagger.sh

* Fix tests for new `group` param in Account model

* More test changes for new `group` param in Account

* Continuing test changes for `group` param stubbing

* Another round of `group` stubbing for tests
This commit is contained in:
pnwmatt 2025-02-08 04:04:30 -08:00 committed by GitHub
parent 00bd0f7658
commit e10de8464a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 180 additions and 86 deletions

View file

@ -149,7 +149,7 @@ In case this post disappears, here are the steps (slightly modified):
> >
> Add your fork as origin: > Add your fork as origin:
> >
> `git remote add origin git@github.com/yourgithubname/gotosocial` > `git remote add origin git@github.com:yourgithubname/gotosocial`
> >
Be sure to run `git fetch` before building the project for the first time. Be sure to run `git fetch` before building the project for the first time.
@ -489,7 +489,7 @@ You can install go-swagger following the instructions [here](https://goswagger.i
If you change Swagger annotations on any of the API paths, you can generate a new Swagger file at `./docs/api/swagger.yaml` by running: If you change Swagger annotations on any of the API paths, you can generate a new Swagger file at `./docs/api/swagger.yaml` by running:
```bash ```bash
swagger generate spec --scan-models --exclude-deps -o docs/api/swagger.yaml go run github.com/go-swagger/go-swagger/cmd/swagger generate spec --scan-models --exclude-deps --output docs/api/swagger.yaml
``` ```
### CI/CD configuration ### CI/CD configuration

View file

@ -300,6 +300,10 @@ definitions:
format: int64 format: int64
type: integer type: integer
x-go-name: FollowingCount x-go-name: FollowingCount
group:
description: Account identifies as a Group actor.
type: boolean
x-go-name: Group
header: header:
description: Web location of the account's header image. description: Web location of the account's header image.
example: https://example.org/media/some_user/header/original/header.jpeg example: https://example.org/media/some_user/header/original/header.jpeg
@ -2439,6 +2443,10 @@ definitions:
format: int64 format: int64
type: integer type: integer
x-go-name: FollowingCount x-go-name: FollowingCount
group:
description: Account identifies as a Group actor.
type: boolean
x-go-name: Group
header: header:
description: Web location of the account's header image. description: Web location of the account's header image.
example: https://example.org/media/some_user/header/original/header.jpeg example: https://example.org/media/some_user/header/original/header.jpeg

View file

@ -114,7 +114,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -169,7 +170,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F"
}, },
@ -216,7 +218,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"statuses_count": 0, "statuses_count": 0,
"last_status_at": null, "last_status_at": null,
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
{ {
@ -266,7 +269,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -313,7 +317,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"statuses_count": 0, "statuses_count": 0,
"last_status_at": null, "last_status_at": null,
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -360,7 +365,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"statuses_count": 1, "statuses_count": 1,
"last_status_at": "2023-11-02", "last_status_at": "2023-11-02",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
{ {
@ -406,7 +412,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
{ {
@ -453,7 +460,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"statuses_count": 0, "statuses_count": 0,
"last_status_at": null, "last_status_at": null,
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
{ {
@ -499,7 +507,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
"statuses_count": 0, "statuses_count": 0,
"last_status_at": null, "last_status_at": null,
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
} }
]`, dst.String()) ]`, dst.String())
@ -584,7 +593,8 @@ func (suite *AccountsGetTestSuite) TestAccountsMinID() {
"statuses_count": 0, "statuses_count": 0,
"last_status_at": null, "last_status_at": null,
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
} }
]`, dst.String()) ]`, dst.String())

View file

@ -189,7 +189,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
"target_account": { "target_account": {
@ -247,7 +248,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -302,7 +304,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F"
}, },
@ -357,7 +360,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F"
}, },
@ -429,7 +433,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -476,7 +481,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
"assigned_account": null, "assigned_account": null,
@ -525,7 +531,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -683,7 +690,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -730,7 +738,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
"assigned_account": null, "assigned_account": null,
@ -779,7 +788,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -937,7 +947,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -984,7 +995,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
"assigned_account": null, "assigned_account": null,
@ -1033,7 +1045,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {

View file

@ -103,7 +103,8 @@ func (suite *GetTestSuite) TestGet() {
"statuses_count": 1, "statuses_count": 1,
"last_status_at": "2023-11-02", "last_status_at": "2023-11-02",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
]`, dst.String()) ]`, dst.String())
} }

View file

@ -191,7 +191,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"max_toot_chars": 5000, "max_toot_chars": 5000,
"rules": [ "rules": [
@ -333,7 +334,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"max_toot_chars": 5000, "max_toot_chars": 5000,
"rules": [ "rules": [
@ -475,7 +477,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"max_toot_chars": 5000, "max_toot_chars": 5000,
"rules": [ "rules": [
@ -668,7 +671,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"max_toot_chars": 5000, "max_toot_chars": 5000,
"rules": [ "rules": [
@ -836,7 +840,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch8() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"max_toot_chars": 5000, "max_toot_chars": 5000,
"rules": [ "rules": [
@ -1015,7 +1020,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"max_toot_chars": 5000, "max_toot_chars": 5000,
"rules": [ "rules": [

View file

@ -148,7 +148,7 @@ func (suite *MutesTestSuite) TestIndefinitelyMutedAccountSerializesMuteExpiratio
// Fetch all muted accounts for the logged-in account. // Fetch all muted accounts for the logged-in account.
// The expected body contains `"mute_expires_at":null`. // The expected body contains `"mute_expires_at":null`.
_, err = suite.getMutedAccounts(http.StatusOK, `[{"id":"01F8MH5ZK5VRH73AKHQM6Y9VNX","username":"foss_satan","acct":"foss_satan@fossbros-anonymous.io","display_name":"big gerald","locked":false,"discoverable":true,"bot":false,"created_at":"2021-09-26T10:52:36.000Z","note":"i post about like, i dunno, stuff, or whatever!!!!","url":"http://fossbros-anonymous.io/@foss_satan","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":0,"following_count":0,"statuses_count":4,"last_status_at":"2024-11-01","emojis":[],"fields":[],"mute_expires_at":null}]`) _, err = suite.getMutedAccounts(http.StatusOK, `[{"id":"01F8MH5ZK5VRH73AKHQM6Y9VNX","username":"foss_satan","acct":"foss_satan@fossbros-anonymous.io","display_name":"big gerald","locked":false,"discoverable":true,"bot":false,"created_at":"2021-09-26T10:52:36.000Z","note":"i post about like, i dunno, stuff, or whatever!!!!","url":"http://fossbros-anonymous.io/@foss_satan","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":0,"following_count":0,"statuses_count":4,"last_status_at":"2024-11-01","emojis":[],"fields":[],"group":false,"mute_expires_at":null}]`)
if err != nil { if err != nil {
suite.FailNow(err.Error()) suite.FailNow(err.Error())
} }

View file

@ -133,7 +133,8 @@ func (suite *ReportGetTestSuite) TestGetReport1() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}`, string(b)) }`, string(b))
} }

View file

@ -159,7 +159,8 @@ func (suite *ReportsGetTestSuite) TestGetReports() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
} }
]`, string(b)) ]`, string(b))
@ -250,7 +251,8 @@ func (suite *ReportsGetTestSuite) TestGetReports4() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
} }
]`, string(b)) ]`, string(b))
@ -325,7 +327,8 @@ func (suite *ReportsGetTestSuite) TestGetReports6() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
} }
]`, string(b)) ]`, string(b))
@ -384,7 +387,8 @@ func (suite *ReportsGetTestSuite) TestGetReports7() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
} }
]`, string(b)) ]`, string(b))

View file

@ -120,7 +120,8 @@ func (suite *StatusHistoryTestSuite) TestGetHistory() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"poll": null, "poll": null,
"media_attachments": [], "media_attachments": [],

View file

@ -139,7 +139,8 @@ func (suite *StatusMuteTestSuite) TestMuteUnmuteStatus() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [], "mentions": [],
@ -227,7 +228,8 @@ func (suite *StatusMuteTestSuite) TestMuteUnmuteStatus() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [], "mentions": [],

View file

@ -126,6 +126,8 @@ type Account struct {
// If set, indicates that this account is currently inactive, and has migrated to the given account. // If set, indicates that this account is currently inactive, and has migrated to the given account.
// Key/value omitted for accounts that haven't moved, and for suspended accounts. // Key/value omitted for accounts that haven't moved, and for suspended accounts.
Moved *Account `json:"moved,omitempty"` Moved *Account `json:"moved,omitempty"`
// Account identifies as a Group actor.
Group bool `json:"group"`
} }
// WebAccount is like Account, but with // WebAccount is like Account, but with

View file

@ -82,7 +82,8 @@ func (suite *NotificationTestSuite) TestStreamNotification() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}`, dst.String()) }`, dst.String())
} }

View file

@ -94,7 +94,8 @@ func (suite *StatusUpdateTestSuite) TestStreamNotification() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {

View file

@ -388,6 +388,7 @@ func (c *Converter) accountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A
EnableRSS: enableRSS, EnableRSS: enableRSS,
HideCollections: hideCollections, HideCollections: hideCollections,
Roles: roles, Roles: roles,
Group: false,
} }
// Bodge default avatar + header in, // Bodge default avatar + header in,

View file

@ -72,7 +72,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontend() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}`, string(b)) }`, string(b))
} }
@ -178,8 +179,10 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendAliasedAndMoved()
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
} "group": false
},
"group": false
}`, string(b)) }`, string(b))
} }
@ -230,7 +233,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiStruct()
} }
], ],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}`, string(b)) }`, string(b))
} }
@ -279,7 +283,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiIDs() {
} }
], ],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}`, string(b)) }`, string(b))
} }
@ -333,7 +338,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendSensitive() {
"color": "", "color": "",
"permissions": "0", "permissions": "0",
"highlighted": false "highlighted": false
} },
"group": false
}`, string(b)) }`, string(b))
} }
@ -370,7 +376,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendPublicPunycode()
"statuses_count": 0, "statuses_count": 0,
"last_status_at": null, "last_status_at": null,
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}`, string(b)) }`, string(b))
} }
@ -409,7 +416,8 @@ func (suite *InternalToFrontendTestSuite) TestLocalInstanceAccountToFrontendPubl
"statuses_count": 0, "statuses_count": 0,
"last_status_at": null, "last_status_at": null,
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}`, string(b)) }`, string(b))
} }
@ -448,7 +456,8 @@ func (suite *InternalToFrontendTestSuite) TestLocalInstanceAccountToFrontendBloc
"statuses_count": 0, "statuses_count": 0,
"last_status_at": null, "last_status_at": null,
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}`, string(b)) }`, string(b))
} }
@ -516,7 +525,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToFrontend() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -695,7 +705,8 @@ func (suite *InternalToFrontendTestSuite) TestWarnFilteredStatusToFrontend() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -879,7 +890,8 @@ func (suite *InternalToFrontendTestSuite) TestWarnFilteredBoostToFrontend() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -1014,7 +1026,8 @@ func (suite *InternalToFrontendTestSuite) TestWarnFilteredBoostToFrontend() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [], "mentions": [],
@ -1301,7 +1314,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToFrontendUnknownAttachments
"statuses_count": 1, "statuses_count": 1,
"last_status_at": "2023-11-02", "last_status_at": "2023-11-02",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -1466,7 +1480,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToWebStatus() {
"statuses_count": 1, "statuses_count": 1,
"last_status_at": "2023-11-02", "last_status_at": "2023-11-02",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -1608,7 +1623,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToFrontendUnknownLanguage()
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -1748,7 +1764,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToFrontendPartialInteraction
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [], "mentions": [],
@ -1863,7 +1880,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToAPIStatusPendingApproval()
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [ "mentions": [
@ -2075,7 +2093,8 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV1ToFrontend() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"max_toot_chars": 5000, "max_toot_chars": 5000,
"rules": [], "rules": [],
@ -2227,7 +2246,8 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV2ToFrontend() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
} }
}, },
"rules": [], "rules": [],
@ -2340,7 +2360,8 @@ func (suite *InternalToFrontendTestSuite) TestReportToFrontend1() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}`, string(b)) }`, string(b))
} }
@ -2396,7 +2417,8 @@ func (suite *InternalToFrontendTestSuite) TestReportToFrontend2() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
} }
}`, string(b)) }`, string(b))
} }
@ -2461,7 +2483,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
"target_account": { "target_account": {
@ -2519,7 +2542,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -2574,7 +2598,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F"
}, },
@ -2629,7 +2654,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F"
}, },
@ -2711,7 +2737,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend2() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
}, },
"created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG" "created_by_application_id": "01F8MGY43H3N2C8EWPR2FPYEXG"
}, },
@ -2758,7 +2785,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend2() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
"assigned_account": null, "assigned_account": null,
@ -2807,7 +2835,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend2() {
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
}, },
"media_attachments": [ "media_attachments": [
{ {
@ -2966,7 +2995,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontendSuspendedLoca
"statuses_count": 4, "statuses_count": 4,
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [] "fields": [],
"group": false
} }
}, },
"target_account": { "target_account": {
@ -3014,7 +3044,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontendSuspendedLoca
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"suspended": true, "suspended": true,
"hide_collections": true "hide_collections": true,
"group": false
} }
}, },
"assigned_account": { "assigned_account": {
@ -3068,7 +3099,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontendSuspendedLoca
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F"
}, },
@ -3123,7 +3155,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontendSuspendedLoca
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F" "created_by_application_id": "01F8MGXQRHYF5QPMTMXP78QC2F"
}, },
@ -3270,7 +3303,8 @@ func (suite *InternalToFrontendTestSuite) TestIntReqToAPI() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"status": { "status": {
"id": "01F8MHC8VWDRBQR0N1BATDDEM5", "id": "01F8MHC8VWDRBQR0N1BATDDEM5",
@ -3331,7 +3365,8 @@ func (suite *InternalToFrontendTestSuite) TestIntReqToAPI() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [], "mentions": [],
@ -3421,7 +3456,8 @@ func (suite *InternalToFrontendTestSuite) TestIntReqToAPI() {
"name": "admin", "name": "admin",
"color": "" "color": ""
} }
] ],
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [ "mentions": [
@ -3531,7 +3567,8 @@ func (suite *InternalToFrontendTestSuite) TestConversationToAPISelfConvo() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
} }
], ],
"last_status": { "last_status": {
@ -3585,7 +3622,8 @@ func (suite *InternalToFrontendTestSuite) TestConversationToAPISelfConvo() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [], "mentions": [],
@ -3698,7 +3736,8 @@ func (suite *InternalToFrontendTestSuite) TestConversationToAPI() {
"verified_at": null "verified_at": null
} }
], ],
"hide_collections": true "hide_collections": true,
"group": false
} }
], ],
"last_status": { "last_status": {
@ -3752,7 +3791,8 @@ func (suite *InternalToFrontendTestSuite) TestConversationToAPI() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"media_attachments": [], "media_attachments": [],
"mentions": [], "mentions": [],
@ -3837,7 +3877,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToAPIEdits() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"poll": null, "poll": null,
"media_attachments": [], "media_attachments": [],
@ -3873,7 +3914,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToAPIEdits() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"poll": null, "poll": null,
"media_attachments": [], "media_attachments": [],
@ -3909,7 +3951,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToAPIEdits() {
"last_status_at": "2024-11-01", "last_status_at": "2024-11-01",
"emojis": [], "emojis": [],
"fields": [], "fields": [],
"enable_rss": true "enable_rss": true,
"group": false
}, },
"poll": null, "poll": null,
"media_attachments": [], "media_attachments": [],