mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-23 11:02:57 -06:00
[bugfix] Don't assume "manuallyApprovesFollowers": true if not set
This commit is contained in:
parent
bce643286c
commit
0977f2a2a4
2 changed files with 3 additions and 3 deletions
|
|
@ -520,11 +520,11 @@ func SetDiscoverable(with WithDiscoverable, discoverable bool) {
|
||||||
|
|
||||||
// GetManuallyApprovesFollowers returns the boolean contained in the ManuallyApprovesFollowers property of 'with'.
|
// 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 {
|
func GetManuallyApprovesFollowers(with WithManuallyApprovesFollowers) bool {
|
||||||
mafProp := with.GetActivityStreamsManuallyApprovesFollowers()
|
mafProp := with.GetActivityStreamsManuallyApprovesFollowers()
|
||||||
if mafProp == nil || !mafProp.IsXMLSchemaBoolean() {
|
if mafProp == nil || !mafProp.IsXMLSchemaBoolean() {
|
||||||
return true
|
return false
|
||||||
}
|
}
|
||||||
return mafProp.Get()
|
return mafProp.Get()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ func (c *Converter) ASRepresentationToAccount(
|
||||||
// Assume not memorial (todo)
|
// Assume not memorial (todo)
|
||||||
acct.MemorializedAt = time.Time{}
|
acct.MemorializedAt = time.Time{}
|
||||||
|
|
||||||
// Extract 'manuallyApprovesFollowers' aka locked account (default = true).
|
// Extract 'manuallyApprovesFollowers' aka locked account (default = false).
|
||||||
manuallyApprovesFollowers := ap.GetManuallyApprovesFollowers(accountable)
|
manuallyApprovesFollowers := ap.GetManuallyApprovesFollowers(accountable)
|
||||||
acct.Locked = &manuallyApprovesFollowers
|
acct.Locked = &manuallyApprovesFollowers
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue