[bugfix] Fix delete follow req instead of follow (#1962)

This commit is contained in:
tobi 2023-07-08 23:12:06 +02:00 committed by GitHub
parent f40bb02f31
commit 6dbb8ba7aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -376,14 +376,14 @@ func (p *Processor) processCreateBlockFromFederator(ctx context.Context, federat
}
// Remove any follows that existed between blocker + blockee.
if err := p.state.DB.DeleteFollowRequest(ctx, block.AccountID, block.TargetAccountID); err != nil {
if err := p.state.DB.DeleteFollow(ctx, block.AccountID, block.TargetAccountID); err != nil {
return gtserror.Newf(
"db error deleting follow from %s targeting %s: %w",
block.AccountID, block.TargetAccountID, err,
)
}
if err := p.state.DB.DeleteFollowRequest(ctx, block.TargetAccountID, block.AccountID); err != nil {
if err := p.state.DB.DeleteFollow(ctx, block.TargetAccountID, block.AccountID); err != nil {
return gtserror.Newf(
"db error deleting follow from %s targeting %s: %w",
block.TargetAccountID, block.AccountID, err,