[backend/signalr] Fix build warnings due to incomplete StreamingHub stub

This commit is contained in:
Laura Hausmann 2024-04-06 20:52:38 +02:00
parent 3286952130
commit e28dc78e96
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -15,7 +15,7 @@ public class StreamingHub : Hub<IStreamingHubClient>, IStreamingHubServer
public override async Task OnConnectedAsync()
{
await base.OnConnectedAsync();
var userId = Context.UserIdentifier;
//Clients.User(userId);
var userId = Context.UserIdentifier ?? throw new Exception("UserIdentifier must not be null at this stage");
await Clients.User(userId).ReceiveMessage("SignalR", "Device connected");
}
}