check boosted account ID when performing usermute checks (#3708)

This commit is contained in:
kim
2025-01-30 15:05:15 +00:00
committed by GitHub
parent b3ecfe1e0a
commit 527587155a
2 changed files with 41 additions and 2 deletions

View File

@ -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
}