using System.Web; using OliverBooth.Common.Data.Blog; namespace OliverBooth.Data.Blog; internal sealed class LegacyComment : ILegacyComment { /// public string? Avatar { get; private set; } /// public string Author { get; private set; } = string.Empty; /// public string Body { get; private set; } = string.Empty; /// public DateTimeOffset CreatedAt { get; private set; } /// public Guid Id { get; private set; } /// public Guid? ParentComment { get; private set; } /// public Guid PostId { get; private set; } /// public string GetAvatarUrl() { return Avatar ?? $"https://ui-avatars.com/api/?name={HttpUtility.UrlEncode(Author)}"; } }