mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 23:16:16 -06:00
me oh my, i'm just a little guy
This commit is contained in:
parent
af14acb266
commit
41ceb67acc
1 changed files with 6 additions and 3 deletions
|
|
@ -389,16 +389,19 @@ func (s *Subscriptions) processDomainPermission(
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// True if a perm already exists.
|
||||||
|
// Note: != nil doesn't work because
|
||||||
|
// of Go interface idiosyncracies.
|
||||||
|
existing := !util.IsNil(existingPerm)
|
||||||
|
|
||||||
if dry {
|
if dry {
|
||||||
// If this is a dry run, return
|
// If this is a dry run, return
|
||||||
// now without doing any DB changes.
|
// now without doing any DB changes.
|
||||||
wouldBeCreated := !covered && existingPerm == nil
|
return !existing, nil
|
||||||
return wouldBeCreated, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle perm creation differently depending
|
// Handle perm creation differently depending
|
||||||
// on whether or not a perm already existed.
|
// on whether or not a perm already existed.
|
||||||
existing := !util.IsNil(existingPerm)
|
|
||||||
switch {
|
switch {
|
||||||
|
|
||||||
case !existing && *permSub.AsDraft:
|
case !existing && *permSub.AsDraft:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue