[bugfix] Don't assume "manuallyApprovesFollowers": true if not set (#3978)

* [bugfix] Don't assume `"manuallyApprovesFollowers": true` if not set

* whoops, tests
This commit is contained in:
tobi 2025-04-07 13:52:24 +02:00 committed by GitHub
commit 6f24205a26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 9 deletions

View file

@ -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()
}