summaryrefslogtreecommitdiff
path: root/internal/typeutils
diff options
context:
space:
mode:
Diffstat (limited to 'internal/typeutils')
-rw-r--r--internal/typeutils/internaltofrontend.go4
-rw-r--r--internal/typeutils/internaltofrontend_test.go4
2 files changed, 6 insertions, 2 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go
index abe2cfaee..68db61128 100644
--- a/internal/typeutils/internaltofrontend.go
+++ b/internal/typeutils/internaltofrontend.go
@@ -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,
}
diff --git a/internal/typeutils/internaltofrontend_test.go b/internal/typeutils/internaltofrontend_test.go
index 676870c7b..946e38b30 100644
--- a/internal/typeutils/internaltofrontend_test.go
+++ b/internal/typeutils/internaltofrontend_test.go
@@ -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))
}