[bugfix] Prevent future statuses entering timelines (#1134)

* [bugfix] Prevent future statuses entering timeline
Statuses created more than 5 minutes into the future are now rejected in the visibility package.

* Come on buddy
This commit is contained in:
tobi
2022-11-24 13:54:49 +01:00
committed by GitHub
parent fcb9c0bb8b
commit da8954858a
5 changed files with 69 additions and 13 deletions

View File

@@ -29,14 +29,10 @@ import (
)
func (f *filter) StatusVisible(ctx context.Context, targetStatus *gtsmodel.Status, requestingAccount *gtsmodel.Account) (bool, error) {
const getBoosted = true
l := log.WithFields(kv.Fields{
{"statusID", targetStatus.ID},
}...)
l := log.WithFields(kv.Fields{{"statusID", targetStatus.ID}}...)
// Fetch any relevant accounts for the target status
const getBoosted = true
relevantAccounts, err := f.relevantAccounts(ctx, targetStatus, getBoosted)
if err != nil {
l.Debugf("error pulling relevant accounts for status %s: %s", targetStatus.ID, err)