From 0977f2a2a467fcb9440e5bb017c87ba6b4422bd6 Mon Sep 17 00:00:00 2001 From: tobi Date: Mon, 7 Apr 2025 13:19:41 +0200 Subject: [PATCH] [bugfix] Don't assume `"manuallyApprovesFollowers": true` if not set --- internal/ap/properties.go | 4 ++-- internal/typeutils/astointernal.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/ap/properties.go b/internal/ap/properties.go index 844373510..e1dea22f0 100644 --- a/internal/ap/properties.go +++ b/internal/ap/properties.go @@ -520,11 +520,11 @@ func SetDiscoverable(with WithDiscoverable, discoverable bool) { // GetManuallyApprovesFollowers returns the boolean contained in the ManuallyApprovesFollowers property of 'with'. // -// Returns default 'true' if property unusable or not set. +// Returns default 'false' if property unusable or not set. func GetManuallyApprovesFollowers(with WithManuallyApprovesFollowers) bool { mafProp := with.GetActivityStreamsManuallyApprovesFollowers() if mafProp == nil || !mafProp.IsXMLSchemaBoolean() { - return true + return false } return mafProp.Get() } diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go index 80e1de378..59c696f11 100644 --- a/internal/typeutils/astointernal.go +++ b/internal/typeutils/astointernal.go @@ -154,7 +154,7 @@ func (c *Converter) ASRepresentationToAccount( // Assume not memorial (todo) acct.MemorializedAt = time.Time{} - // Extract 'manuallyApprovesFollowers' aka locked account (default = true). + // Extract 'manuallyApprovesFollowers' aka locked account (default = false). manuallyApprovesFollowers := ap.GetManuallyApprovesFollowers(accountable) acct.Locked = &manuallyApprovesFollowers