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

This commit is contained in:
tobi 2025-04-07 13:19:41 +02:00
commit 0977f2a2a4
2 changed files with 3 additions and 3 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()
}