From 006c8b604b88fdddf1a2319e44aa37dd8777efd9 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 4 Sep 2022 14:41:42 +0200 Subject: [feature] Set default header and avatar for API accounts to GtS ones (#799) * validate web-asset-base-dir * move default icons into converter * always ensure avatar + header on api accounts * update tests * add default header * don't return error from web module creation anymore * tidy a bit * use pngs for default avatars rather than svgs --- internal/typeutils/internaltofrontend.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/typeutils/internaltofrontend.go') diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 6ccbed340..0243e4732 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -190,6 +190,9 @@ func (c *converter) AccountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A Suspended: suspended, } + c.ensureAvatar(accountFrontend) + c.ensureHeader(accountFrontend) + return accountFrontend, nil } -- cgit v1.2.3