public override Task OnConnected() { foreach (string organizationId in Context.User.GetOrganizationIds()) { Groups.Add(Context.ConnectionId, organizationId); } _userIdConnections.Add(Context.User.GetUserId(), Context.ConnectionId); return(base.OnConnected()); }
protected override async Task OnConnected(IRequest request, string connectionId) { try { foreach (var organizationId in request.User.GetOrganizationIds()) { await Groups.Add(connectionId, organizationId); } _userIdConnections.Add(request.User.GetUserId(), connectionId); } catch (Exception ex) { Logger.Error().Exception(ex).Message($"OnConnected Error: {ex.Message}").Tag("SignalR").Write(); throw; } }
protected override async Task OnConnected(IRequest request, string connectionId) { try { foreach (var organizationId in request.User.GetOrganizationIds()) { await Groups.Add(connectionId, organizationId); } _userIdConnections.Add(request.User.GetUserId(), connectionId); } catch (Exception ex) { _logger.Error(ex, "OnConnected Error: {0}", ex.Message); throw; } }