Skip to content

Commit

Permalink
[bugfix] Fix delete follow req instead of follow (#1962)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmethurst committed Jul 8, 2023
1 parent f40bb02 commit 6dbb8ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/processing/fromfederator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6dbb8ba

Please sign in to comment.