From 4b181b925dc7d712c65a4c52629c82efd4cbe392 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Thu, 26 Mar 2026 23:13:17 +0100 Subject: [PATCH] feat(federation): export resolveLocalUser and resolveOrCreateReplicatedUser Make both identity resolution helpers module-level exports so the group DM endpoint can import and use them when resolving federated user identities during group DM creation. --- packages/server/src/routes/federation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/routes/federation.ts b/packages/server/src/routes/federation.ts index 9a4fbf90..80bdda71 100644 --- a/packages/server/src/routes/federation.ts +++ b/packages/server/src/routes/federation.ts @@ -831,7 +831,7 @@ export async function federationRoutes(app: FastifyInstance): Promise { * Matches users where home_user_id = homeUserId, or where * the user's own id equals homeUserId and they have no home_instance set (local user). */ -function resolveLocalUser( +export function resolveLocalUser( homeUserId: string, db: ReturnType, ): typeof schema.users.$inferSelect | undefined { @@ -865,7 +865,7 @@ function resolveLocalUser( * friend-connect flow. We create a bare-bones row so the local DB * can reference them in dm_members / dm_messages. */ -function resolveOrCreateReplicatedUser( +export function resolveOrCreateReplicatedUser( homeUserId: string, homeInstance: string, db: ReturnType,