From 6f26b32ec3ed57ed3b04cba357abb9ee5060f229 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:22:16 +0200 Subject: [bugfix] Don't nil emojis + fields on blocked accounts (#2968) * [bugfix] Don't nil emojis + fields on blocked accounts * comment * swagger --- internal/typeutils/internaltofrontend.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/typeutils/internaltofrontend.go') 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, } -- cgit v1.2.3