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.
This commit is contained in:
@@ -831,7 +831,7 @@ export async function federationRoutes(app: FastifyInstance): Promise<void> {
|
|||||||
* Matches users where home_user_id = homeUserId, or where
|
* 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).
|
* the user's own id equals homeUserId and they have no home_instance set (local user).
|
||||||
*/
|
*/
|
||||||
function resolveLocalUser(
|
export function resolveLocalUser(
|
||||||
homeUserId: string,
|
homeUserId: string,
|
||||||
db: ReturnType<typeof getDb>,
|
db: ReturnType<typeof getDb>,
|
||||||
): typeof schema.users.$inferSelect | undefined {
|
): typeof schema.users.$inferSelect | undefined {
|
||||||
@@ -865,7 +865,7 @@ function resolveLocalUser(
|
|||||||
* friend-connect flow. We create a bare-bones row so the local DB
|
* friend-connect flow. We create a bare-bones row so the local DB
|
||||||
* can reference them in dm_members / dm_messages.
|
* can reference them in dm_members / dm_messages.
|
||||||
*/
|
*/
|
||||||
function resolveOrCreateReplicatedUser(
|
export function resolveOrCreateReplicatedUser(
|
||||||
homeUserId: string,
|
homeUserId: string,
|
||||||
homeInstance: string,
|
homeInstance: string,
|
||||||
db: ReturnType<typeof getDb>,
|
db: ReturnType<typeof getDb>,
|
||||||
|
|||||||
Reference in New Issue
Block a user