mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[performance] add caching of status fave, boost of, in reply to ID lists (#2060)
This commit is contained in:
@ -40,13 +40,13 @@ func (c *converter) interactionsWithStatusForAccount(ctx context.Context, s *gts
|
||||
si := &statusInteractions{}
|
||||
|
||||
if requestingAccount != nil {
|
||||
faved, err := c.db.IsStatusFavedBy(ctx, s, requestingAccount.ID)
|
||||
faved, err := c.db.IsStatusFavedBy(ctx, s.ID, requestingAccount.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error checking if requesting account has faved status: %s", err)
|
||||
}
|
||||
si.Faved = faved
|
||||
|
||||
reblogged, err := c.db.IsStatusRebloggedBy(ctx, s, requestingAccount.ID)
|
||||
reblogged, err := c.db.IsStatusBoostedBy(ctx, s.ID, requestingAccount.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error checking if requesting account has reblogged status: %s", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user