[backend/masto-client] Send empty string content for notes without text

This commit is contained in:
Laura Hausmann 2024-06-04 17:43:10 +02:00
parent acea67a298
commit 28fa7eb5de
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -80,9 +80,11 @@ public class NoteRenderer(
var quoteInaccessible =
note.Renote == null && ((note.RenoteId != null && recurse > 0) || note.RenoteUri != null);
var content = text != null && data?.Source != true
? await mfmConverter.ToHtmlAsync(text, mentionedUsers, note.UserHost, quoteUri, quoteInaccessible,
replyInaccessible)
var content = data?.Source != true
? text != null
? await mfmConverter.ToHtmlAsync(text, mentionedUsers, note.UserHost, quoteUri, quoteInaccessible,
replyInaccessible)
: ""
: null;
var account = data?.Accounts?.FirstOrDefault(p => p.Id == note.UserId) ??