From c8a780e12a8112a4d4cbe8ed72d241a382f73903 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 11 Apr 2025 16:36:40 +0200 Subject: [bugfix] Fix setting bot on/off (#3986) * [bugfix] Fix setting bot on/off * read client messages in tests * test fix --- internal/processing/account/update.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'internal/processing/account/update.go') diff --git a/internal/processing/account/update.go b/internal/processing/account/update.go index 60d2cb8f6..83a046a25 100644 --- a/internal/processing/account/update.go +++ b/internal/processing/account/update.go @@ -77,8 +77,16 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form acctColumns = append(acctColumns, "discoverable") } - if form.Bot != nil { - account.ActorType = gtsmodel.AccountActorTypeService + if bot := form.Bot; bot != nil { + if *bot { + // Mark account as an Application. + // See: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-application + account.ActorType = gtsmodel.AccountActorTypeApplication + } else { + // Mark account as a Person. + // See: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person + account.ActorType = gtsmodel.AccountActorTypePerson + } acctColumns = append(acctColumns, "actor_type") } -- cgit v1.2.3