mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-23 22:33:31 -06:00
[bugfix] Don't nil emojis + fields on blocked accounts (#2968)
* [bugfix] Don't nil emojis + fields on blocked accounts * comment * swagger
This commit is contained in:
parent
3b7faac604
commit
6f26b32ec3
4 changed files with 14 additions and 4 deletions
|
|
@ -368,6 +368,10 @@ func (c *Converter) AccountToAPIAccountBlocked(ctx context.Context, a *gtsmodel.
|
|||
Bot: *a.Bot,
|
||||
CreatedAt: util.FormatISO8601(a.CreatedAt),
|
||||
URL: a.URL,
|
||||
// Empty array (not nillable).
|
||||
Emojis: make([]apimodel.Emoji, 0),
|
||||
// Empty array (not nillable).
|
||||
Fields: make([]apimodel.Field, 0),
|
||||
Suspended: !a.SuspendedAt.IsZero(),
|
||||
Role: role,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -420,8 +420,8 @@ func (suite *InternalToFrontendTestSuite) TestLocalInstanceAccountToFrontendBloc
|
|||
"following_count": 0,
|
||||
"statuses_count": 0,
|
||||
"last_status_at": null,
|
||||
"emojis": null,
|
||||
"fields": null
|
||||
"emojis": [],
|
||||
"fields": []
|
||||
}`, string(b))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue