public async Task DonateWater() { UsernameVo username = GetUsernameVoForCurrentConnection(); _logger.LogInformation($"User '{username._value}' is looking for requestors in need of water."); await Groups.AddToGroupAsync(username._value, "donators"); UsernameVo requestor = new UsernameVo("drybar21"); if (_requestorConnections.ContainsKey(requestor)) { _logger.LogInformation($"Sending message to requestor '{requestor}'s connections."); // Get their connection Id(s) var connectionIds = _requestorConnections.GetValues(requestor); foreach (var connectionId in connectionIds) { _logger.LogInformation($"The requestor: drybar21 has requested water, we will now send a message to his connectionId '{connectionId}' him from the donator."); await _requestHubContext.Clients.Client(connectionId).SendAsync("ReceiveMessage", $"Donator '{username._value}' has sent you a message!"); } } }