diff options
Diffstat (limited to 'internal/timeline/timeline.go')
-rw-r--r-- | internal/timeline/timeline.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/timeline/timeline.go b/internal/timeline/timeline.go index 7408436dc..363c0999c 100644 --- a/internal/timeline/timeline.go +++ b/internal/timeline/timeline.go @@ -27,8 +27,11 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/typeutils" + "github.com/superseriousbusiness/gotosocial/internal/visibility" ) +const boostReinsertionDepth = 50 + // Timeline represents a timeline for one account, and contains indexed and prepared posts. type Timeline interface { /* @@ -59,7 +62,7 @@ type Timeline interface { */ // IndexOne puts a status into the timeline at the appropriate place according to its 'createdAt' property. - IndexOne(statusCreatedAt time.Time, statusID string) error + IndexOne(statusCreatedAt time.Time, statusID string, boostOfID string) error // OldestIndexedPostID returns the id of the rearmost (ie., the oldest) indexed post, or an error if something goes wrong. // If nothing goes wrong but there's no oldest post, an empty string will be returned so make sure to check for this. @@ -109,6 +112,7 @@ type timeline struct { accountID string account *gtsmodel.Account db db.DB + filter visibility.Filter tc typeutils.TypeConverter log *logrus.Logger sync.Mutex @@ -121,6 +125,7 @@ func NewTimeline(accountID string, db db.DB, typeConverter typeutils.TypeConvert preparedPosts: &preparedPosts{}, accountID: accountID, db: db, + filter: visibility.NewFilter(db, log), tc: typeConverter, log: log, } |