public async Task SendMessage(string roomId, int userId, string text) { var message = _roomService.AddMessageToRoom(roomId, userId, text); await Clients.Group(roomId).SendAsync("ReceiveMessage", new { message.FromUserId, message.Text, message.CreatedDateTime }); }