summaryrefslogtreecommitdiff
path: root/internal/typeutils/internaltofrontend.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-01-30 15:05:15 +0000
committerLibravatar GitHub <noreply@github.com>2025-01-30 15:05:15 +0000
commit527587155a69ffb26a0c2210a4b31db9c6c27cdb (patch)
treef6dd1a95e1c0a12061057db129d35ce559f2ea93 /internal/typeutils/internaltofrontend.go
parent[docs] remove `-X POST` from curl commands (#3665) (diff)
downloadgotosocial-527587155a69ffb26a0c2210a4b31db9c6c27cdb.tar.xz
check boosted account ID when performing usermute checks (#3708)
Diffstat (limited to 'internal/typeutils/internaltofrontend.go')
-rw-r--r--internal/typeutils/internaltofrontend.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go
index d9c8748f5..d5c7cb0b1 100644
--- a/internal/typeutils/internaltofrontend.go
+++ b/internal/typeutils/internaltofrontend.go
@@ -943,8 +943,9 @@ func (c *Converter) statusToAPIFilterResults(
// Both mutes and filters can expire.
now := time.Now()
- // If the requesting account mutes the account that created this status, hide the status.
- if mutes.Matches(s.AccountID, filterContext, now) {
+ // If requesting account mutes the author (taking boosts into account), hide it.
+ if (s.BoostOfAccountID != "" && mutes.Matches(s.AccountID, filterContext, now)) ||
+ mutes.Matches(s.AccountID, filterContext, now) {
return nil, statusfilter.ErrHideStatus
}