Skip to content
On this page

Function: matchMergedUser()

TypeScript
function matchMergedUser(session: {
  merged_rh?: unknown;
}, lookup: (rh: string) => 
  | string
  | Promise<string | null | undefined>
  | null
| undefined): Promise<MergedUserMatch>;

Defined in: me-client/src/merged.ts:39 (opens in a new tab)

Which of your users this person was before a merge. Call it with a verified session whose did_oc you have no row for. lookup answers the user that stored a handle, or null.

  • none: create a user, as for anyone new.
  • one: attach this did_oc and rh to that user.
  • conflict: the handles name two of your users. Pick neither; log it.

ParametersLink to this section

ParameterType
session{ merged_rh?: unknown; }
session.merged_rh?unknown
lookup(rh: string) => | string | Promise<string | null | undefined> | null | undefined

ReturnsLink to this section

Promise<MergedUserMatch>