Reports, and who liked or boosted a post

Another's profile and posts can be reported from the client (/api/v1/reports): a category, words, and for a remote
account a copy to its server, which PrivaPub sends from its own actor, never naming the persona. Who liked or boosted
a post opens from its card's menu (favourited_by, reblogged_by). e2e: a report from a Mastodon account's profile
reaches PrivaPub's moderators forwarded, and a post's likes and boosts list the persona who gave them; the admin
helper the tests share moves to Support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-06 16:47:19 +02:00
1 parent bb68ff8d5e
commit a0f07abf8c
17 files changed
+410 -16

No files matched your search

+3
View File
@@ -101,6 +101,9 @@ public static class APIs
public const string GET_ScheduledStatuses = "api/v1/scheduled_statuses";
public static string GET_M_StatusSource(string statusId) => $"api/v1/statuses/{Uri.EscapeDataString(statusId)}/source";
public static string GET_M_StatusHistory(string statusId) => $"api/v1/statuses/{Uri.EscapeDataString(statusId)}/history";
public static string GET_M_FavouritedBy(string statusId) => $"api/v1/statuses/{Uri.EscapeDataString(statusId)}/favourited_by";
public static string GET_M_RebloggedBy(string statusId) => $"api/v1/statuses/{Uri.EscapeDataString(statusId)}/reblogged_by";
public const string POST_Reports = "api/v1/reports";
public static string PUT_M_Status(string statusId) => $"api/v1/statuses/{Uri.EscapeDataString(statusId)}";
public const string GET_FollowedTags = "api/v1/followed_tags";
public const string GET_GroupedNotifications = "api/v2/notifications";
+12
View File
@@ -206,6 +206,18 @@ public class StatusSource
public string SpoilerText { get; set; }
}
/// <summary>/api/v1/reports: an account, and some of its posts, reported to the persona's server's moderators; forwarded,
/// a remote account's server gets it too, from the server's own actor.</summary>
public class ReportRequest
{
public string AccountId { get; set; }
public List<string> StatusIds { get; set; } = [];
public string Comment { get; set; }
/// <summary>spam, legal or other.</summary>
public string Category { get; set; }
public bool Forward { get; set; }
}
/// <summary>/api/v1/statuses/:id/history: one version of a post, the oldest first and the one showing last.</summary>
public class StatusEdit
{
+18
View File
@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
using decePubClient.Models.Types;
using decePubClient.Resources;
namespace decePubClient.Models;
/// <summary>A report of an account, and of the post it was made from, as the report dialog edits it.</summary>
public class ReportForm
{
public const int CommentLength = 1000;
public ReportCategory Category { get; set; } = ReportCategory.Other;
[StringLength(CommentLength, ErrorMessageResourceName = ValidationNames.MaxLength, ErrorMessageResourceType = typeof(ErrorMessages))]
public string Comment { get; set; }
/// <summary>A copy to a remote account's own server, from PrivaPub's actor.</summary>
public bool Forward { get; set; } = true;
}
+10
View File
@@ -0,0 +1,10 @@
namespace decePubClient.Models.Types
{
/// <summary>Why an account is reported (Mastodon's categories, without its server rules, which PrivaPub has none of).</summary>
public enum ReportCategory
{
Other = 0,
Spam = 1,
Legal = 2
}
}