A post on a wall says whose, and the persona takes posts off its own

PrivaPub hosts what a persona's followers write on its wall (Smithereen's, FEP-400e) and shows posts written on walls
elsewhere to their owners' followers. A card names the wall (privapub.wall, data-wall, linking the profile), and one
written on the persona's own wall is taken off from the card's menu, which PrivaPub tells as a Remove and Smithereen
applies as a deletion. WallTests checks it against Smithereen.

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 08:38:49 +02:00
1 parent 23dbc68fb4
commit 03824babbc
6 files changed
+155

No files matched your search

+36
View File
@@ -118,6 +118,16 @@
</span>
</header>
@if (status.Privapub?.Wall is { } wall)
{
<p class="inline-flex items-center gap-2 min-w-0 text-xs opacity-80" data-wall="@wall.Acct">
<i class="ion-md-clipboard" aria-hidden="true"></i>
<a class="truncate" href="@($"account/{Uri.EscapeDataString(wall.Id)}")" title="@wall.Acct">
@Localizer["On the wall of {0}", wall.Name]
</a>
</p>
}
@if (Warnings.Count > 0 && !showFiltered)
{
<div class="flex flex-wrap items-center gap-2 text-sm rounded-lg neo-inset neo-2xs px-3 py-2" data-filtered>
@@ -298,6 +308,13 @@
<span>@Localizer["Quote"]</span>
</DButton>
}
@if (IsOnOwnWall(status))
{
<DButton Size="DSize.Sm" class="justify-start whitespace-nowrap" Disabled="IsDefaultDisabled || isActing" OnClick="TakeOffWall" data-take-off-wall>
<i aria-hidden="true" class="ion-md-trash text-base text-error"></i>
<span>@Localizer["Take off my wall"]</span>
</DButton>
}
@if (!IsOwn)
{
<DButton Size="DSize.Sm" class="justify-start whitespace-nowrap" Disabled="IsDefaultDisabled || isActing" OnClick="@(() => AccountAction("mute"))">
@@ -828,6 +845,25 @@
await OnDeleted.InvokeAsync(Post);
}
// someone's post on the persona's wall: its owner deletes it there (PrivaPub tells the wall's readers, and Smithereen
// deletes the post)
bool IsOnOwnWall(Status status) => !IsOwn && status.Privapub?.Wall?.Id is { } owner && owner == CascadingState.PersonaId;
async Task TakeOffWall()
{
isActing = true;
var result = await StatusService.Delete(Status.Id);
isActing = false;
if (result.IsInvalid)
{
Toast.AddResponseError(result);
return;
}
Toast.AddResponseSuccess(Localizer["Taken off your wall."]);
await OnDeleted.InvokeAsync(Post);
}
async Task AccountAction(string action)
{
isActing = true;