♻️ A more robust and simpler chat system

This commit is contained in:
2025-11-30 20:58:48 +08:00
parent e97719ec84
commit c038ab9e3c
9 changed files with 2114 additions and 178 deletions

View File

@@ -580,7 +580,7 @@ public partial class ChatService(
{
var call = await GetCallOngoingAsync(roomId);
if (call is null) throw new InvalidOperationException("No ongoing call was not found.");
if (sender.Role < ChatMemberRole.Moderator && call.SenderId != sender.Id)
if (sender.AccountId != call.Room.AccountId && call.SenderId != sender.Id)
throw new InvalidOperationException("You are not the call initiator either the chat room moderator.");
// End the realtime session if it exists