pleroma: private ctors

This commit is contained in:
uwaa 2024-12-25 23:09:26 +00:00
parent b623cb5fc6
commit e5273860a6
9 changed files with 44 additions and 0 deletions

View file

@ -53,6 +53,10 @@ public class Account : ASObject
}
}
internal Account()
{
}
public override string ToString() => $"@{Webfinger}";
}

View file

@ -9,4 +9,8 @@ public class AccountField
public string Value { get; set; } = null!;
public DateTime? VerifiedAt { get; set; }
internal AccountField()
{
}
}

View file

@ -50,6 +50,10 @@ public class Attachment
[JsonPropertyName("url")]
public string URL { get; set; } = null!;
internal Attachment()
{
}
/// <summary>
/// Downloads the attachment.
/// </summary>

View file

@ -7,4 +7,8 @@ public class Context
[JsonPropertyName("descendants")]
public Status[] Descendants { get; set; } = null!;
internal Context()
{
}
}

View file

@ -14,5 +14,9 @@ public class Hashtag
[JsonPropertyName("url")]
public string URL { get; set; } = null!;
internal Hashtag()
{
}
public override string ToString() => $"#{Name}";
}

View file

@ -28,5 +28,9 @@ public class Mention
[JsonPropertyName("username")]
public string Username { get; set; } = null!;
internal Mention()
{
}
public override string ToString() => $"@{Account}";
}

View file

@ -49,4 +49,8 @@ public class Relationship
[JsonPropertyName("subscribing")]
public bool Subscribing { get; set; }
internal Relationship()
{
}
}

View file

@ -19,4 +19,8 @@ public class SearchResults
/// </summary>
[JsonPropertyName("statuses")]
public Status[]? Statuses { get; set; }
internal SearchResults()
{
}
}

View file

@ -140,6 +140,10 @@ public class Status : ASObject
[JsonIgnore]
public string Content => Pleroma?.Content?.Plain ?? HtmlContent;
internal Status()
{
}
/// <summary>
/// Returns true if a status mentions or replies to a user.
/// </summary>
@ -165,12 +169,20 @@ public class PleromaStatusData
[JsonPropertyName("quote_id")]
public string? QuoteID { get; set; }
internal PleromaStatusData()
{
}
}
public class PleromaStatusContent
{
[JsonPropertyName("text/plain")]
public string Plain { get; set; } = null!;
internal PleromaStatusContent()
{
}
}
[JsonConverter(typeof(StatusIDConverter))]