[backend/masto-client] Remove confusing status context logic
This does technically match Mastodon's behavior, but it doesn't match the behavior of iceshrimp-js, or the Iceshrimp.NET web API. It's also very confusing.
This commit is contained in:
parent
727ba75d0e
commit
862d477dec
1 changed files with 0 additions and 8 deletions
|
@ -96,14 +96,6 @@ public class StatusController(
|
||||||
if (security.Value.PublicPreview <= Enums.PublicPreview.Restricted && note.UserHost != null && user == null)
|
if (security.Value.PublicPreview <= Enums.PublicPreview.Restricted && note.UserHost != null && user == null)
|
||||||
throw GracefulException.Forbidden("Public preview is disabled on this instance");
|
throw GracefulException.Forbidden("Public preview is disabled on this instance");
|
||||||
|
|
||||||
var shouldShowContext = await db.Notes
|
|
||||||
.Where(p => p.Id == id)
|
|
||||||
.FilterHidden(user, db)
|
|
||||||
.AnyAsync();
|
|
||||||
|
|
||||||
if (!shouldShowContext)
|
|
||||||
return new StatusContext { Ancestors = [], Descendants = [] };
|
|
||||||
|
|
||||||
// Akkoma-FE calls /context on boosts
|
// Akkoma-FE calls /context on boosts
|
||||||
if (note.IsPureRenote)
|
if (note.IsPureRenote)
|
||||||
return await GetStatusContext(note.RenoteId!);
|
return await GetStatusContext(note.RenoteId!);
|
||||||
|
|
Loading…
Add table
Reference in a new issue