tangled
alpha
login
or
join now
cduck.me
/
statusphere-example-app-fork
0
fork
atom
Scratch space for learning atproto app development
0
fork
atom
overview
issues
pulls
pipelines
tidy
Matthieu Sieben
10 months ago
5fb7e1dc
50bb430c
+2
-3
1 changed file
expand all
collapse all
unified
split
src
id-resolver.ts
+2
-3
src/id-resolver.ts
reviewed
···
1
1
import { OAuthClient } from '@atproto/oauth-client-node'
2
2
3
3
export interface BidirectionalResolver {
4
4
-
resolveDidToHandle(did: string): Promise<string>
4
4
+
resolveDidToHandle(did: string): Promise<string | undefined>
5
5
resolveDidsToHandles(
6
6
dids: string[],
7
7
): Promise<Record<string, string | undefined>>
···
11
11
identityResolver,
12
12
}: OAuthClient): BidirectionalResolver {
13
13
return {
14
14
-
async resolveDidToHandle(did: string): Promise<string> {
14
14
+
async resolveDidToHandle(did: string): Promise<string | undefined> {
15
15
try {
16
16
const { handle } = await identityResolver.resolve(did)
17
17
if (handle) return handle
18
18
} catch {
19
19
// Ignore
20
20
}
21
21
-
return did
22
21
},
23
22
24
23
async resolveDidsToHandles(