summaryrefslogtreecommitdiff
path: root/internal/processing/workers/fromfediapi.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-08-11 11:05:49 +0200
committerLibravatar GitHub <noreply@github.com>2023-08-11 11:05:49 +0200
commita26af1310f06363b265f144236878091d57d2bf4 (patch)
treed523d23b48e64cd85d84c8d9a6b762573f55b777 /internal/processing/workers/fromfediapi.go
parent[bugfix] Use length in runes when trimming for RSS (#2094) (diff)
downloadgotosocial-a26af1310f06363b265f144236878091d57d2bf4.tar.xz
[bugfix] Populate followReq before accessing targetaccount pointer (#2099)
Diffstat (limited to 'internal/processing/workers/fromfediapi.go')
-rw-r--r--internal/processing/workers/fromfediapi.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/processing/workers/fromfediapi.go b/internal/processing/workers/fromfediapi.go
index 5fbb0066b..50add88a3 100644
--- a/internal/processing/workers/fromfediapi.go
+++ b/internal/processing/workers/fromfediapi.go
@@ -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.