summaryrefslogtreecommitdiff
path: root/internal/processing/account/update.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-04-11 16:36:40 +0200
committerLibravatar GitHub <noreply@github.com>2025-04-11 15:36:40 +0100
commitc8a780e12a8112a4d4cbe8ed72d241a382f73903 (patch)
treeb385a1d5e11a0de4a84bba01d44e2b2b75abff16 /internal/processing/account/update.go
parent[chore] Fix header insets (#3987) (diff)
downloadgotosocial-c8a780e12a8112a4d4cbe8ed72d241a382f73903.tar.xz
[bugfix] Fix setting bot on/off (#3986)
* [bugfix] Fix setting bot on/off * read client messages in tests * test fix
Diffstat (limited to 'internal/processing/account/update.go')
-rw-r--r--internal/processing/account/update.go12
1 files changed, 10 insertions, 2 deletions
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")
}