Uwaa/Pleroma/Models/Mention.cs
2024-12-25 23:34:13 +00:00

37 lines
997 B
C#

namespace Uwaa.Pleroma;
public class Mention
{
public static implicit operator string(Mention mention) => mention.ID;
/// <summary>
/// The webfinger acct: URI of the mentioned user. Equivalent to <c>username</c> for local users, or <c>username@domain</c> for remote users.
/// </summary>
[JsonPropertyName("acct")]
public string Account { get; set; } = null!;
/// <summary>
/// The account id of the mentioned user
/// </summary>
[JsonPropertyName("id")]
public string ID { get; set; } = null!;
/// <summary>
/// The location of the mentioned user's profile
/// </summary>
[JsonPropertyName("url")]
public string URL { get; set; } = null!;
/// <summary>
/// The username of the mentioned user
/// </summary>
[JsonPropertyName("username")]
public string Username { get; set; } = null!;
[JsonConstructor()]
internal Mention()
{
}
public override string ToString() => $"@{Account}";
}