[backend/core] Render renote notifications correctly

This commit is contained in:
Laura Hausmann 2024-03-24 15:07:20 +01:00
parent b9582681d4
commit ff97dfa627
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -14,9 +14,7 @@ public class NotificationRenderer(NoteRenderer noteRenderer, UserRenderer userRe
{
var dbNotifier = notification.Notifier ?? throw new GracefulException("Notification has no notifier");
var targetNote = notification.Type == Notification.NotificationType.Renote
? notification.Note?.Renote
: notification.Note;
var targetNote = notification.Note;
var note = targetNote != null
? statuses?.FirstOrDefault(p => p.Id == targetNote.Id) ??