[backend/masto-client] Add missing includes for note mention users in NoteRenderer

This commit is contained in:
Laura Hausmann 2024-02-16 05:50:59 +01:00
parent 053ff63add
commit ad54623c64
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -30,7 +30,8 @@ public class NoteRenderer(
var liked = likedNotes?.Contains(note.Id) ?? await db.NoteLikes.AnyAsync(p => p.Note == note && p.User == user);
if (mentions == null) {
mentions = await db.Users.Where(p => note.Mentions.Contains(p.Id))
mentions = await db.Users.IncludeCommonProperties()
.Where(p => note.Mentions.Contains(p.Id))
.Select(u => new Mention(u, config.Value.WebDomain))
.ToListAsync();
}