using Hutopy.Modules.Identity.Contracts; using Hutopy.Modules.Identity.Data; namespace Hutopy.Modules.Identity.Services; public sealed class UserLookup( UserManager userManager) : IUserLookup { public async Task GetUserAsync(Guid userId, CancellationToken cancellationToken = default) { User? user = await userManager.FindByIdAsync(userId.ToString()); return user is null ? null : new UserReference( user.Id, user.Fullname, user.PortraitUrl); } }