From 862d477dec7261e63a07177ce92550ef675f7573 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 20 Nov 2024 01:56:41 +0100 Subject: [PATCH] [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. --- .../Controllers/Mastodon/StatusController.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Iceshrimp.Backend/Controllers/Mastodon/StatusController.cs b/Iceshrimp.Backend/Controllers/Mastodon/StatusController.cs index 76543485..43aad874 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/StatusController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/StatusController.cs @@ -96,14 +96,6 @@ public class StatusController( if (security.Value.PublicPreview <= Enums.PublicPreview.Restricted && note.UserHost != null && user == null) 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 if (note.IsPureRenote) return await GetStatusContext(note.RenoteId!);