🐛 Dozens of fixes

This commit is contained in:
2025-07-20 01:00:41 +08:00
parent 3380c8f688
commit 7b9150bd88
8 changed files with 75 additions and 107 deletions

View File

@@ -100,6 +100,12 @@ public partial class ChatController(
.Skip(offset)
.Take(take)
.ToListAsync();
var members = messages.Select(m => m.Sender).DistinctBy(x => x.Id).ToList();
members = await crs.LoadMemberAccounts(members);
foreach (var message in messages)
message.Sender = members.First(x => x.Id == message.SenderId);
Response.Headers["X-Total"] = totalCount.ToString();