From e337aa83b8b8477b5ab38f0118b1410764236c87 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 17 Sep 2024 21:35:13 +0200 Subject: [PATCH] [bugfix] Fix pending approval check (#3316) --- internal/federation/federatingdb/accept.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/federation/federatingdb/accept.go b/internal/federation/federatingdb/accept.go index 8082e555f..571e62aed 100644 --- a/internal/federation/federatingdb/accept.go +++ b/internal/federation/federatingdb/accept.go @@ -311,7 +311,8 @@ func (f *federatingDB) acceptStatusIRI( return nil } - if util.PtrOrValue(status.PendingApproval, false) { + pendingApproval := util.PtrOrValue(status.PendingApproval, false) + if !pendingApproval { // Status doesn't need approval or it's // already been approved by an Accept. // Just return. @@ -402,7 +403,8 @@ func (f *federatingDB) acceptLikeIRI( return nil } - if !util.PtrOrValue(fave.PendingApproval, false) { + pendingApproval := util.PtrOrValue(fave.PendingApproval, false) + if !pendingApproval { // Like doesn't need approval or it's // already been approved by an Accept. // Just return.