summaryrefslogtreecommitdiff
path: root/internal/federation/federatingprotocol.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-24 17:56:48 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-24 17:56:48 +0200
commitc7cfbe2702913a6d6e7c962992546c96aa512068 (patch)
tree4b0bb21aab9be586d5db26d172f548e12c07f96e /internal/federation/federatingprotocol.go
parentGoreleaser (#241) (diff)
downloadgotosocial-c7cfbe2702913a6d6e7c962992546c96aa512068.tar.xz
Unblock fix (#247)
* start tests for inbox posts * go mod tidy * rename transferContext * test block/unblock * improve logging * improve logging * fix comment typo
Diffstat (limited to 'internal/federation/federatingprotocol.go')
-rw-r--r--internal/federation/federatingprotocol.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/federation/federatingprotocol.go b/internal/federation/federatingprotocol.go
index 7f8958111..c0ed97d5c 100644
--- a/internal/federation/federatingprotocol.go
+++ b/internal/federation/federatingprotocol.go
@@ -203,19 +203,22 @@ func (f *federator) Blocked(ctx context.Context, actorIRIs []*url.URL) (bool, er
if err == db.ErrNoEntries {
// we don't have an entry for this account so it's not blocked
// TODO: allow a different default to be set for this behavior
+ l.Tracef("no entry for account with URI %s so it can't be blocked", uri)
continue
}
return false, fmt.Errorf("error getting account with uri %s: %s", uri.String(), err)
}
- blocked, err = f.db.IsBlocked(ctx, requestedAccount.ID, requestingAccount.ID, true)
+ blocked, err = f.db.IsBlocked(ctx, requestedAccount.ID, requestingAccount.ID, false)
if err != nil {
return false, fmt.Errorf("error checking account block: %s", err)
}
if blocked {
+ l.Tracef("local account %s blocks account with uri %s", requestedAccount.Username, uri)
return true, nil
}
}
+
return false, nil
}