mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 15:56: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
|
||||
}
|
||||
|
||||
// True if a perm already exists.
|
||||
// Note: != nil doesn't work because
|
||||
// of Go interface idiosyncracies.
|
||||
existing := !util.IsNil(existingPerm)
|
||||
|
||||
if dry {
|
||||
// If this is a dry run, return
|
||||
// now without doing any DB changes.
|
||||
wouldBeCreated := !covered && existingPerm == nil
|
||||
return wouldBeCreated, nil
|
||||
return !existing, nil
|
||||
}
|
||||
|
||||
// Handle perm creation differently depending
|
||||
// on whether or not a perm already existed.
|
||||
existing := !util.IsNil(existingPerm)
|
||||
switch {
|
||||
|
||||
case !existing && *permSub.AsDraft:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue