mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-16 19:27:30 -06:00
favourites GET implementation (#95)
This commit is contained in:
parent
c5180b3860
commit
c7da64922f
16 changed files with 491 additions and 127 deletions
|
|
@ -23,7 +23,7 @@ func (t *timeline) IndexBefore(statusID string, include bool, amount int) error
|
|||
|
||||
grabloop:
|
||||
for len(filtered) < amount {
|
||||
statuses, err := t.db.GetStatusesWhereFollowing(t.accountID, "", offsetStatus, "", amount, false)
|
||||
statuses, err := t.db.GetHomeTimelineForAccount(t.accountID, "", offsetStatus, "", amount, false)
|
||||
if err != nil {
|
||||
if _, ok := err.(db.ErrNoEntries); ok {
|
||||
break grabloop // we just don't have enough statuses left in the db so index what we've got and then bail
|
||||
|
|
@ -58,7 +58,7 @@ func (t *timeline) IndexBehind(statusID string, amount int) error {
|
|||
|
||||
grabloop:
|
||||
for len(filtered) < amount {
|
||||
statuses, err := t.db.GetStatusesWhereFollowing(t.accountID, offsetStatus, "", "", amount, false)
|
||||
statuses, err := t.db.GetHomeTimelineForAccount(t.accountID, offsetStatus, "", "", amount, false)
|
||||
if err != nil {
|
||||
if _, ok := err.(db.ErrNoEntries); ok {
|
||||
break grabloop // we just don't have enough statuses left in the db so index what we've got and then bail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue