Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Populate followRequest before accessing TargetAccount ptr #2099

Merged
merged 1 commit into from Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/processing/workers/fromfediapi.go
Expand Up @@ -265,6 +265,10 @@ func (p *fediAPI) CreateFollowReq(ctx context.Context, fMsg messages.FromFediAPI
return gtserror.Newf("%T not parseable as *gtsmodel.FollowRequest", fMsg.GTSModel)
}

if err := p.state.DB.PopulateFollowRequest(ctx, followRequest); err != nil {
return gtserror.Newf("error populating follow request: %w", err)
}

if *followRequest.TargetAccount.Locked {
// Account on our instance is locked:
// just notify the follow request.
Expand Down