From 97de0b84107fedb63a66a347e4696c7f687bdeb3 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 28 Sep 2024 04:35:40 +0200 Subject: [PATCH] [backend/api] Fix erroneous values regarding reply/quote inaccessibility --- Iceshrimp.Backend/Controllers/Web/Renderers/NoteRenderer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Iceshrimp.Backend/Controllers/Web/Renderers/NoteRenderer.cs b/Iceshrimp.Backend/Controllers/Web/Renderers/NoteRenderer.cs index 0438753f..671b5b1d 100644 --- a/Iceshrimp.Backend/Controllers/Web/Renderers/NoteRenderer.cs +++ b/Iceshrimp.Backend/Controllers/Web/Renderers/NoteRenderer.cs @@ -49,7 +49,7 @@ public class NoteRenderer( res.QuoteInaccessible = note.RenoteUri != null; res.Reply = reply; res.ReplyId = note.ReplyId; - res.ReplyInaccessible = note.ReplyUri != null; + res.ReplyInaccessible = note.Reply == null && (note.ReplyId != null || note.ReplyUri != null); return res; } @@ -61,7 +61,7 @@ public class NoteRenderer( res.Quote = quote; res.QuoteId = note.RenoteId; - res.QuoteInaccessible = note.RenoteUri != null; + res.QuoteInaccessible = note.Renote == null && (note.ReplyId != null || note.RenoteUri != null); return res; }