mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-26 01:03:31 -06:00
[feature] Add requested_by to relationship model (#2672)
* [feature] Add `requested_by` to relationship model * whoops, missed some tests
This commit is contained in:
parent
65a273bc39
commit
8cafa6b74b
9 changed files with 121 additions and 2 deletions
|
|
@ -74,6 +74,15 @@ func (r *relationshipDB) GetRelationship(ctx context.Context, requestingAccount
|
|||
return nil, gtserror.Newf("error checking requested: %w", err)
|
||||
}
|
||||
|
||||
// check if target has follow requested requesting
|
||||
rel.RequestedBy, err = r.IsFollowRequested(ctx,
|
||||
targetAccount,
|
||||
requestingAccount,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, gtserror.Newf("error checking requestedBy: %w", err)
|
||||
}
|
||||
|
||||
// check if the requesting account is blocking the target account
|
||||
rel.Blocking, err = r.IsBlocked(ctx, requestingAccount, targetAccount)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue