mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-07 12:58:06 -06:00
[bugfix] Fix relationship not updating 'following' on accept follow request (#1658)
This commit is contained in:
parent
fe4ea964cd
commit
344c7e5cbd
3 changed files with 33 additions and 9 deletions
|
|
@ -204,7 +204,8 @@ func (r *relationshipDB) AcceptFollowRequest(ctx context.Context, sourceAccountI
|
|||
return nil, r.conn.ProcessError(err)
|
||||
}
|
||||
|
||||
// Invalidate follow request from cache lookups.
|
||||
// Invalidate follow request from cache lookups; this will
|
||||
// invalidate the follow as well via the invalidate hook.
|
||||
r.state.Caches.GTS.FollowRequest().Invalidate("ID", followReq.ID)
|
||||
|
||||
// Delete original follow request notification
|
||||
|
|
@ -225,12 +226,8 @@ func (r *relationshipDB) RejectFollowRequest(ctx context.Context, sourceAccountI
|
|||
}
|
||||
|
||||
// Delete original follow request.
|
||||
if _, err := r.conn.
|
||||
NewDelete().
|
||||
Table("follow_requests").
|
||||
Where("? = ?", bun.Ident("id"), followReq.ID).
|
||||
Exec(ctx); err != nil {
|
||||
return r.conn.ProcessError(err)
|
||||
if err := r.DeleteFollowRequestByID(ctx, followReq.ID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete original follow request notification
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue