[backend/database] Fix Note.IsQuote not handling cw-only renotes correctly

This commit is contained in:
Laura Hausmann 2024-06-19 14:05:28 +02:00
parent 0bbdbbe7f3
commit c4763e9c67
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -269,7 +269,8 @@ public class Note : IEntity
[NotMapped]
[Projectable]
public bool IsQuote => (RenoteId != null || Renote != null) && (Text != null || HasPoll || FileIds.Count > 0);
public bool IsQuote => (RenoteId != null || Renote != null) &&
(Text != null || Cw != null || HasPoll || FileIds.Count > 0);
[ForeignKey(nameof(UserId))]
[InverseProperty(nameof(Tables.User.Notes))]