[bugfix] Fix relationship not updating 'following' on accept follow request (#1658)

This commit is contained in:
tobi 2023-03-31 12:16:25 +02:00 committed by GitHub
commit 344c7e5cbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 9 deletions

View file

@ -102,6 +102,9 @@ func (c *Caches) setuphooks() {
// Invalidate follow request target account ID cached visibility.
c.Visibility.Invalidate("ItemID", followReq.TargetAccountID)
c.Visibility.Invalidate("RequesterID", followReq.TargetAccountID)
// Invalidate any cached follow corresponding to this request.
c.GTS.Follow().Invalidate("AccountID.TargetAccountID", followReq.AccountID, followReq.TargetAccountID)
})
c.GTS.Status().SetInvalidateCallback(func(status *gtsmodel.Status) {