Sort chat rooms by last message created at

This commit is contained in:
2025-05-24 02:12:32 +08:00
parent b905d674b7
commit 2eff4364c9
2 changed files with 19 additions and 0 deletions

View File

@ -54,6 +54,7 @@ public class ChatRoomController(
.Select(m => m.ChatRoom)
.ToListAsync();
chatRooms = await crs.LoadDirectMessageMembers(chatRooms, userId);
chatRooms = await crs.SortChatRoomByLastMessage(chatRooms);
return Ok(chatRooms);
}