diff options
author | 2021-08-25 15:34:33 +0200 | |
---|---|---|
committer | 2021-08-25 15:34:33 +0200 | |
commit | 2dc9fc1626507bb54417fc4a1920b847cafb27a2 (patch) | |
tree | 4ddeac479b923db38090aac8bd9209f3646851c1 /internal/visibility/filter.go | |
parent | Manually approves followers (#146) (diff) | |
download | gotosocial-2dc9fc1626507bb54417fc4a1920b847cafb27a2.tar.xz |
Pg to bun (#148)
* start moving to bun
* changing more stuff
* more
* and yet more
* tests passing
* seems stable now
* more big changes
* small fix
* little fixes
Diffstat (limited to 'internal/visibility/filter.go')
-rw-r--r-- | internal/visibility/filter.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/visibility/filter.go b/internal/visibility/filter.go index 2c43fa4ee..644e85b35 100644 --- a/internal/visibility/filter.go +++ b/internal/visibility/filter.go @@ -19,6 +19,8 @@ package visibility import ( + "context" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" @@ -29,17 +31,17 @@ type Filter interface { // StatusVisible returns true if targetStatus is visible to requestingAccount, based on the // privacy settings of the status, and any blocks/mutes that might exist between the two accounts // or account domains, and other relevant accounts mentioned in or replied to by the status. - StatusVisible(targetStatus *gtsmodel.Status, requestingAccount *gtsmodel.Account) (bool, error) + StatusVisible(ctx context.Context, targetStatus *gtsmodel.Status, requestingAccount *gtsmodel.Account) (bool, error) // StatusHometimelineable returns true if targetStatus should be in the home timeline of the requesting account. // // This function will call StatusVisible internally, so it's not necessary to call it beforehand. - StatusHometimelineable(targetStatus *gtsmodel.Status, requestingAccount *gtsmodel.Account) (bool, error) + StatusHometimelineable(ctx context.Context, targetStatus *gtsmodel.Status, requestingAccount *gtsmodel.Account) (bool, error) // StatusPublictimelineable returns true if targetStatus should be in the public timeline of the requesting account. // // This function will call StatusVisible internally, so it's not necessary to call it beforehand. - StatusPublictimelineable(targetStatus *gtsmodel.Status, timelineOwnerAccount *gtsmodel.Account) (bool, error) + StatusPublictimelineable(ctx context.Context, targetStatus *gtsmodel.Status, timelineOwnerAccount *gtsmodel.Account) (bool, error) } type filter struct { |