Polls, quotes and edits from the composer

The composer can hold a poll instead of media (two to four choices, a
length, one choice or several), quote a post (offered on a card when the
server says the persona may quote it), and edit the persona's own post: its
words and warning come from /source, and saving keeps its media,
visibility and poll. A card's menu offers Edit and Quote, and now opens
sideways: upwards, the first card's menu was cut off by the top of the
feed. The e2e tests publish a poll, edit a post and quote it, each checked
on PrivaPub.

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-05 04:42:42 +02:00
1 parent a4d9831691
commit 5c11727f58
12 files changed
+434 -12

No files matched your search

+2
View File
@@ -71,6 +71,8 @@ public static class APIs
public static string GET_M_AccountLists(string accountId) => $"api/v1/accounts/{Uri.EscapeDataString(accountId)}/lists";
public static string GET_M_ListTimeline(string listId) => $"api/v1/timelines/list/{Uri.EscapeDataString(listId)}";
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 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";
public const string GET_UnreadNotifications = "api/v2/notifications/unread_count";
+9
View File
@@ -37,6 +37,15 @@ public class ComposeForm
public double? Latitude { get; set; }
public double? Longitude { get; set; }
/// <summary>A poll instead of media: two to four choices, open ExpiresIn seconds, one choice or several.</summary>
public bool HasPoll { get; set; }
public List<string> PollOptions { get; set; } = ["", ""];
public int PollExpiresIn { get; set; } = 86400;
public bool PollMultiple { get; set; }
/// <summary>The post this one quotes.</summary>
public string QuotedStatusId { get; set; }
/// <summary>Whether the post waits for ScheduledAt (a datetime-local value, the reader's own time) instead of going now.</summary>
public bool IsScheduled { get; set; }
public string ScheduledAt { get; set; }
+26
View File
@@ -178,6 +178,32 @@ public class PostStatusForm
public string Language { get; set; }
/// <summary>When the post is to be published (ISO 8601, at least five minutes ahead); null posts it now.</summary>
public string ScheduledAt { get; set; }
public PollForm Poll { get; set; }
public string QuotedStatusId { get; set; }
}
public class PollForm
{
public List<string> Options { get; set; } = [];
public int ExpiresIn { get; set; }
public bool Multiple { get; set; }
}
/// <summary>What an edit sends: the words and their warning; the media stay as they are.</summary>
public class StatusEditForm
{
public string Status { get; set; }
public string SpoilerText { get; set; }
public bool Sensitive { get; set; }
public string Language { get; set; }
}
/// <summary>/api/v1/statuses/:id/source: the author's own text of a post, to edit it.</summary>
public class StatusSource
{
public string Id { get; set; }
public string Text { get; set; }
public string SpoilerText { get; set; }
}
/// <summary>A post waiting for its time (/api/v1/scheduled_statuses).</summary>
+9
View File
@@ -45,6 +45,8 @@ public class Status
/// <summary>The persona's filters this post matches, whatever their context (the card picks those of where it is).</summary>
public List<FilterResult> Filtered { get; set; } = [];
public int QuotesCount { get; set; }
/// <summary>Who may quote it: CurrentUser is automatic, manual (asked) or denied for the persona.</summary>
public QuoteApproval QuoteApproval { get; set; }
}
public class StatusMention
@@ -130,3 +132,10 @@ public class PreviewCard
public int Height { get; set; }
public string Blurhash { get; set; }
}
public class QuoteApproval
{
public List<string> Automatic { get; set; } = [];
public List<string> Manual { get; set; } = [];
public string CurrentUser { get; set; }
}