pleroma: move mention out
This commit is contained in:
parent
460564b2f9
commit
1a3a0c6d4e
2 changed files with 32 additions and 31 deletions
32
Pleroma/Models/Mention.cs
Normal file
32
Pleroma/Models/Mention.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
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!;
|
||||
|
||||
public override string ToString() => $"@{Account}";
|
||||
}
|
|
@ -158,37 +158,6 @@ public class Status
|
|||
public override string ToString() => $"{Account?.Username ?? "unknown"}: \"{Content}\"";
|
||||
}
|
||||
|
||||
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!;
|
||||
|
||||
public override string ToString() => $"@{Account}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Additional pleroma-specific data for a <see cref="Status"/>.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in a new issue