summaryrefslogtreecommitdiff
path: root/internal/processing/status
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/status')
-rw-r--r--internal/processing/status/bookmark.go6
-rw-r--r--internal/processing/status/boost.go2
-rw-r--r--internal/processing/status/fave.go7
-rw-r--r--internal/processing/status/get.go18
-rw-r--r--internal/processing/status/mute.go6
-rw-r--r--internal/processing/status/pin.go6
6 files changed, 38 insertions, 7 deletions
diff --git a/internal/processing/status/bookmark.go b/internal/processing/status/bookmark.go
index 634529ba4..224445838 100644
--- a/internal/processing/status/bookmark.go
+++ b/internal/processing/status/bookmark.go
@@ -30,7 +30,11 @@ import (
)
func (p *Processor) getBookmarkableStatus(ctx context.Context, requestingAccount *gtsmodel.Account, targetStatusID string) (*gtsmodel.Status, string, gtserror.WithCode) {
- targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx, requestingAccount, targetStatusID)
+ targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx,
+ requestingAccount,
+ targetStatusID,
+ false, // refresh
+ )
if errWithCode != nil {
return nil, "", errWithCode
}
diff --git a/internal/processing/status/boost.go b/internal/processing/status/boost.go
index 2062fb802..2fc96091e 100644
--- a/internal/processing/status/boost.go
+++ b/internal/processing/status/boost.go
@@ -43,6 +43,7 @@ func (p *Processor) BoostCreate(
ctx,
requester,
targetID,
+ false, // refresh
)
if errWithCode != nil {
return nil, errWithCode
@@ -112,6 +113,7 @@ func (p *Processor) BoostRemove(
ctx,
requester,
targetID,
+ false, // refresh
)
if errWithCode != nil {
return nil, errWithCode
diff --git a/internal/processing/status/fave.go b/internal/processing/status/fave.go
index dbeba7fe9..7ac270e8c 100644
--- a/internal/processing/status/fave.go
+++ b/internal/processing/status/fave.go
@@ -47,6 +47,7 @@ func (p *Processor) getFaveableStatus(
ctx,
requester,
targetID,
+ false, // refresh
)
if errWithCode != nil {
return nil, nil, errWithCode
@@ -149,7 +150,11 @@ func (p *Processor) FaveRemove(ctx context.Context, requestingAccount *gtsmodel.
// FavedBy returns a slice of accounts that have liked the given status, filtered according to privacy settings.
func (p *Processor) FavedBy(ctx context.Context, requestingAccount *gtsmodel.Account, targetStatusID string) ([]*apimodel.Account, gtserror.WithCode) {
- targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx, requestingAccount, targetStatusID)
+ targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx,
+ requestingAccount,
+ targetStatusID,
+ false, // refresh
+ )
if errWithCode != nil {
return nil, errWithCode
}
diff --git a/internal/processing/status/get.go b/internal/processing/status/get.go
index c182bd148..f8c037404 100644
--- a/internal/processing/status/get.go
+++ b/internal/processing/status/get.go
@@ -28,7 +28,11 @@ import (
// Get gets the given status, taking account of privacy settings and blocks etc.
func (p *Processor) Get(ctx context.Context, requestingAccount *gtsmodel.Account, targetStatusID string) (*apimodel.Status, gtserror.WithCode) {
- targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx, requestingAccount, targetStatusID)
+ targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx,
+ requestingAccount,
+ targetStatusID,
+ false, // refresh
+ )
if errWithCode != nil {
return nil, errWithCode
}
@@ -38,7 +42,11 @@ func (p *Processor) Get(ctx context.Context, requestingAccount *gtsmodel.Account
// WebGet gets the given status for web use, taking account of privacy settings.
func (p *Processor) WebGet(ctx context.Context, targetStatusID string) (*apimodel.Status, gtserror.WithCode) {
- targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx, nil, targetStatusID)
+ targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx,
+ nil, // requester
+ targetStatusID,
+ false, // refresh
+ )
if errWithCode != nil {
return nil, errWithCode
}
@@ -57,7 +65,11 @@ func (p *Processor) contextGet(
targetStatusID string,
convert func(context.Context, *gtsmodel.Status, *gtsmodel.Account) (*apimodel.Status, error),
) (*apimodel.Context, gtserror.WithCode) {
- targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx, requestingAccount, targetStatusID)
+ targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx,
+ requestingAccount,
+ targetStatusID,
+ false, // refresh
+ )
if errWithCode != nil {
return nil, errWithCode
}
diff --git a/internal/processing/status/mute.go b/internal/processing/status/mute.go
index 1663ee0bc..fb4f3b384 100644
--- a/internal/processing/status/mute.go
+++ b/internal/processing/status/mute.go
@@ -41,7 +41,11 @@ func (p *Processor) getMuteableStatus(
requestingAccount *gtsmodel.Account,
targetStatusID string,
) (*gtsmodel.Status, gtserror.WithCode) {
- targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx, requestingAccount, targetStatusID)
+ targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx,
+ requestingAccount,
+ targetStatusID,
+ false, // refresh
+ )
if errWithCode != nil {
return nil, errWithCode
}
diff --git a/internal/processing/status/pin.go b/internal/processing/status/pin.go
index b31288a64..f08b9652c 100644
--- a/internal/processing/status/pin.go
+++ b/internal/processing/status/pin.go
@@ -39,7 +39,11 @@ const allowedPinnedCount = 10
// - Status is public, unlisted, or followers-only.
// - Status is not a boost.
func (p *Processor) getPinnableStatus(ctx context.Context, requestingAccount *gtsmodel.Account, targetStatusID string) (*gtsmodel.Status, gtserror.WithCode) {
- targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx, requestingAccount, targetStatusID)
+ targetStatus, errWithCode := p.c.GetVisibleTargetStatus(ctx,
+ requestingAccount,
+ targetStatusID,
+ false, // refresh
+ )
if errWithCode != nil {
return nil, errWithCode
}