[backend/masto-client] Move replyInaccessible marker into CW field for notes with CW

This commit is contained in:
Laura Hausmann 2025-01-07 08:14:33 +01:00
parent c21147c86f
commit 9de6d15a0c
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -112,6 +112,16 @@ public class NoteRenderer(
_ => MfmInlineMedia.MediaType.Other
}, p.RemoteUrl ?? p.Url, p.Description)).ToList();
var cw = note.Cw;
if (replyInaccessible && !string.IsNullOrEmpty(cw))
{
// prefix with lock emoji
cw = "RE: \ud83d\udd12, " + cw;
// prevent duplicating inaccessible marker in the body
replyInaccessible = false;
}
string? content = null;
if (data?.Source != true)
{