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/internaltoas.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/typeutils/internaltoas.go') diff --git a/internal/typeutils/internaltoas.go b/internal/typeutils/internaltoas.go index 7d420de2c..4e6c6da77 100644 --- a/internal/typeutils/internaltoas.go +++ b/internal/typeutils/internaltoas.go @@ -36,7 +36,6 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/superseriousbusiness/gotosocial/internal/uris" - "github.com/superseriousbusiness/gotosocial/internal/util" "github.com/superseriousbusiness/gotosocial/internal/util/xslices" ) @@ -49,7 +48,7 @@ func (c *Converter) AccountToAS( // accountable is a service if this // is a bot account, otherwise a person. var accountable ap.Accountable - if util.PtrOrZero(a.Bot) { + if a.ActorType.IsBot() { accountable = streams.NewActivityStreamsService() } else { accountable = streams.NewActivityStreamsPerson() @@ -393,7 +392,7 @@ func (c *Converter) AccountToASMinimal( // accountable is a service if this // is a bot account, otherwise a person. var accountable ap.Accountable - if util.PtrOrZero(a.Bot) { + if a.ActorType.IsBot() { accountable = streams.NewActivityStreamsService() } else { accountable = streams.NewActivityStreamsPerson() -- cgit v1.2.3