[backend/masto-client] Fix StatusController quote lookup precedence

This commit is contained in:
Laura Hausmann 2024-10-29 16:14:54 +01:00
parent 5d1e1ed05d
commit dc7e45c7cb
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -442,7 +442,13 @@ public class StatusController(
.FirstOrDefaultAsync()
: await db.Notes
.IncludeCommonProperties()
.Where(p => p.Uri == quoteUri || p.Url == quoteUri)
.Where(p => p.Uri == quoteUri)
.EnsureVisibleFor(user)
.FilterHidden(user, db, filterMutes: false)
.FirstOrDefaultAsync() ??
await db.Notes
.IncludeCommonProperties()
.Where(p => p.Url == quoteUri)
.EnsureVisibleFor(user)
.FilterHidden(user, db, filterMutes: false)
.FirstOrDefaultAsync()