feat(web): route DM creation to home instance with federated identity

All DM creation and add-member call sites now use the home api client
and pass homeUserId/homeInstance instead of routing to the remote instance.
Also updates addMember in the API client to accept AddDmMemberRequest.
This commit is contained in:
Jannis Braun
2026-04-01 12:45:13 +02:00
parent 4d7a777ae4
commit 7f3ca4e6d1
7 changed files with 49 additions and 33 deletions
@@ -114,7 +114,11 @@ export function AddDmMemberModal() {
} else {
// Existing group DM → add each friend sequentially
for (const friend of selectedFriends) {
await api.dm.addMember(dmChannelId, { userId: friend.id });
await api.dm.addMember(dmChannelId, {
userId: friend.homeInstance ? undefined : friend.id,
homeUserId: friend.homeUserId ?? undefined,
homeInstance: friend.homeInstance ?? undefined,
});
}
closeModal();
}