mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 07:52:24 -05:00
[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:
parent
bce643286c
commit
6f24205a26
3 changed files with 9 additions and 9 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue