diff options
author | 2022-11-24 13:54:49 +0100 | |
---|---|---|
committer | 2022-11-24 13:54:49 +0100 | |
commit | da8954858afb4d5a3a2faf55e77d7da3be0ea3db (patch) | |
tree | e81046ed4a4a00a9c5969115e151002deab67613 /internal/visibility/statusvisible.go | |
parent | [chore] cleanup storage implementation, no need for multiple interface types ... (diff) | |
download | gotosocial-da8954858afb4d5a3a2faf55e77d7da3be0ea3db.tar.xz |
[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
Diffstat (limited to 'internal/visibility/statusvisible.go')
-rw-r--r-- | internal/visibility/statusvisible.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/internal/visibility/statusvisible.go b/internal/visibility/statusvisible.go index c62ebb0af..43131410b 100644 --- a/internal/visibility/statusvisible.go +++ b/internal/visibility/statusvisible.go @@ -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) |