From 8bc630ec534f7d08296477ac7e3e826b55665c85 Mon Sep 17 00:00:00 2001 From: pnwmatt <180812017+pnwmatt@users.noreply.github.com> Date: Thu, 6 Feb 2025 17:50:29 -0800 Subject: [PATCH] Stub out account's Group parameter --- docs/api/swagger.yaml | 5 +++++ internal/api/model/account.go | 2 ++ internal/typeutils/internaltofrontend.go | 1 + 3 files changed, 8 insertions(+) diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index ed44a5561..fd361a9fa 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -300,6 +300,11 @@ definitions: format: int64 type: integer x-go-name: FollowingCount + group: + description: Indicates that the account represents a Group actor. + format: boolean + type: boolean + x-go-name: Group header: description: Web location of the account's header image. example: https://example.org/media/some_user/header/original/header.jpeg diff --git a/internal/api/model/account.go b/internal/api/model/account.go index a27033d5d..c60ef12d6 100644 --- a/internal/api/model/account.go +++ b/internal/api/model/account.go @@ -126,6 +126,8 @@ type Account struct { // If set, indicates that this account is currently inactive, and has migrated to the given account. // Key/value omitted for accounts that haven't moved, and for suspended accounts. Moved *Account `json:"moved,omitempty"` + // Account identifies as a Group actor + Group bool `json:"group"` } // WebAccount is like Account, but with diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 8375a8c3a..446fe1954 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -388,6 +388,7 @@ func (c *Converter) accountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A EnableRSS: enableRSS, HideCollections: hideCollections, Roles: roles, + Group: false, } // Bodge default avatar + header in,