summaryrefslogtreecommitdiff
path: root/internal/processing
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-01-08 22:38:27 +0100
committerLibravatar GitHub <noreply@github.com>2025-01-08 22:38:27 +0100
commit8daa4dae3435e45b4367c9d59bfa27a063fba2d4 (patch)
tree9d2c937b79e001c98e9499c65d2a1346000a895a /internal/processing
parent[feature] Fetch + create domain permissions from subscriptions nightly (#3635) (diff)
downloadgotosocial-8daa4dae3435e45b4367c9d59bfa27a063fba2d4.tar.xz
[bugfix] More permissive CSV parsing for perm subs, text parse fix (#3638)
* [bugfix] More permissive CSV parsing for perm subs, text parse fix * wee * change the way dry works, slightly * me oh my, i'm just a little guy * we're just normal men
Diffstat (limited to 'internal/processing')
-rw-r--r--internal/processing/admin/domainpermissionsubscription.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/processing/admin/domainpermissionsubscription.go b/internal/processing/admin/domainpermissionsubscription.go
index 6c051222c..bdc38df63 100644
--- a/internal/processing/admin/domainpermissionsubscription.go
+++ b/internal/processing/admin/domainpermissionsubscription.go
@@ -272,6 +272,12 @@ func (p *Processor) DomainPermissionSubscriptionRemove(
return nil, gtserror.NewErrorNotFound(err, err.Error())
}
+ // Convert to API perm sub *before* doing the deletion.
+ apiPermSub, errWithCode := p.apiDomainPermSub(ctx, permSub)
+ if errWithCode != nil {
+ return nil, errWithCode
+ }
+
// TODO in next PR: if removeChildren, then remove all
// domain permissions that are children of this domain
// permission subscription. If not removeChildren, then
@@ -282,7 +288,7 @@ func (p *Processor) DomainPermissionSubscriptionRemove(
return nil, gtserror.NewErrorInternalError(err)
}
- return p.apiDomainPermSub(ctx, permSub)
+ return apiPermSub, nil
}
func (p *Processor) DomainPermissionSubscriptionTest(