From 8ae2440da3a9b66c379c5a9444b50e758deef61b Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 6 Apr 2025 14:39:40 +0200 Subject: [chore] Migrate accounts to new table, relax uniqueness constraint of actor `url` and collections (#3928) * [chore] Migrate accounts to new table, relax uniqueness constraint of actor url and collections * fiddle with it! (that's what she said) * remove unused cache fields * sillyness * fix tiny whoopsie --- internal/typeutils/internaltofrontend.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/typeutils/internaltofrontend.go') diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 62a1ebc1e..7584e2b26 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -361,7 +361,6 @@ func (c *Converter) accountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A var ( locked = util.PtrOrValue(a.Locked, true) discoverable = util.PtrOrValue(a.Discoverable, false) - bot = util.PtrOrValue(a.Bot, false) ) // Remaining properties are simple and @@ -374,7 +373,7 @@ func (c *Converter) accountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A DisplayName: a.DisplayName, Locked: locked, Discoverable: discoverable, - Bot: bot, + Bot: a.ActorType.IsBot(), CreatedAt: util.FormatISO8601(a.CreatedAt), Note: a.Note, URL: a.URL, @@ -518,7 +517,7 @@ func (c *Converter) AccountToAPIAccountBlocked(ctx context.Context, a *gtsmodel. ID: a.ID, Username: a.Username, Acct: acct, - Bot: *a.Bot, + Bot: a.ActorType.IsBot(), CreatedAt: util.FormatISO8601(a.CreatedAt), URL: a.URL, // Empty array (not nillable). -- cgit v1.2.3