diff --git a/Pleroma/Models/Account.cs b/Pleroma/Models/Account.cs index 22bc4f7..dd23e3b 100644 --- a/Pleroma/Models/Account.cs +++ b/Pleroma/Models/Account.cs @@ -41,7 +41,25 @@ public class Account [JsonPropertyName("username")] public string Username { get; set; } = null!; - public override string ToString() => $"@{Username}"; + [JsonPropertyName("acct")] + public string Webfinger { get; set; } = null!; + + public string? Instance + { + get + { + if (Webfinger == null) + return null; + + int spl = Webfinger.IndexOf('@'); + if (spl == -1) + return null; + + return Webfinger[(spl + 1)..]; + } + } + + public override string ToString() => $"@{Webfinger}"; } [JsonConverter(typeof(AccountIDConverter))]