mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
Database updates (#144)
* start moving some database stuff around * continue moving db stuff around * more fiddling * more updates * and some more * and yet more * i broke SOMETHING but what, it's a mystery * tidy up * vendor ttlcache * use ttlcache * fix up some tests * rename some stuff * little reminder * some more updates
This commit is contained in:
@ -10,25 +10,25 @@ func (c *converter) interactionsWithStatusForAccount(s *gtsmodel.Status, request
|
||||
si := &statusInteractions{}
|
||||
|
||||
if requestingAccount != nil {
|
||||
faved, err := c.db.StatusFavedBy(s, requestingAccount.ID)
|
||||
faved, err := c.db.IsStatusFavedBy(s, 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.StatusRebloggedBy(s, requestingAccount.ID)
|
||||
reblogged, err := c.db.IsStatusRebloggedBy(s, requestingAccount.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error checking if requesting account has reblogged status: %s", err)
|
||||
}
|
||||
si.Reblogged = reblogged
|
||||
|
||||
muted, err := c.db.StatusMutedBy(s, requestingAccount.ID)
|
||||
muted, err := c.db.IsStatusMutedBy(s, requestingAccount.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error checking if requesting account has muted status: %s", err)
|
||||
}
|
||||
si.Muted = muted
|
||||
|
||||
bookmarked, err := c.db.StatusBookmarkedBy(s, requestingAccount.ID)
|
||||
bookmarked, err := c.db.IsStatusBookmarkedBy(s, requestingAccount.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error checking if requesting account has bookmarked status: %s", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user