mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 05:02:24 -05:00
[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:
parent
fcb9c0bb8b
commit
da8954858a
5 changed files with 69 additions and 13 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue