fix: store in_reply_to on remote notes + use full handle in federation component links/actions

This commit is contained in:
2026-05-15 05:09:44 +02:00
parent e04b08c202
commit 09bebf7dc9
8 changed files with 28 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ export function PendingRequests({ compact = false }: Props) {
className="flex items-center justify-between gap-3"
>
<Link
href={`/users/@${actor.handle}`}
href={`/users/@${fullFediverseHandle(actor.handle, actor.url)}`}
className="flex items-center gap-2 min-w-0 hover:opacity-80"
>
<UserAvatar

View File

@@ -39,7 +39,7 @@ export function RemoteFollowers() {
{followers.map((actor) => (
<li key={actor.url} className="flex items-center justify-between gap-3">
<Link
href={`/users/@${actor.handle}`}
href={`/users/@${fullFediverseHandle(actor.handle, actor.url)}`}
className="flex items-center gap-2 min-w-0 hover:opacity-80"
>
<UserAvatar

View File

@@ -22,9 +22,10 @@ export function RemoteFollowing() {
.finally(() => setLoading(false));
}, [token]);
const unfollow = async (handle: string) => {
const unfollow = async (actor: RemoteActor) => {
if (!token) return;
setFollowing((prev) => prev.filter((f) => f.handle !== handle));
const handle = fullFediverseHandle(actor.handle, actor.url);
setFollowing((prev) => prev.filter((f) => f.url !== actor.url));
await unfollowRemoteActor(handle, token).catch(() => {
toast.error("Failed to unfollow");
});
@@ -39,7 +40,7 @@ export function RemoteFollowing() {
{following.map((actor) => (
<li key={actor.url} className="flex items-center justify-between gap-3">
<Link
href={`/users/@${actor.handle}`}
href={`/users/@${fullFediverseHandle(actor.handle, actor.url)}`}
className="flex items-center gap-2 min-w-0 hover:opacity-80"
>
<UserAvatar
@@ -59,7 +60,7 @@ export function RemoteFollowing() {
<Button
size="sm"
variant="outline"
onClick={() => unfollow(actor.handle)}
onClick={() => unfollow(actor)}
>
Unfollow
</Button>