Dashboard Customization Polish (#2295)

This commit is contained in:
Joe Milazzo 2023-09-30 12:33:16 -06:00 committed by GitHub
parent 25e759d301
commit 25ffb2ffe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 255 additions and 258 deletions

View file

@ -1,5 +1,6 @@
using System.Linq;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using API.Data;
using API.SignalR.Presence;
@ -55,8 +56,7 @@ public class EventHub : IEventHub
/// <returns></returns>
public async Task SendMessageToAsync(string method, SignalRMessage message, int userId)
{
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(userId) ?? throw new InvalidOperationException();
await _messageHub.Clients.User(user.UserName!).SendAsync(method, message);
await _messageHub.Clients.Users(new List<string>() {userId + string.Empty}).SendAsync(method, message);
}
}