Skip to content

Commit c258a98

Browse files
authored
cmd/bsky-webhook: use DID for users with invalid handles (#13)
handle.invalid breaks links
1 parent 4ee8419 commit c258a98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/bsky-webhook/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,11 @@ func getBskyProfile(ctx context.Context, bskyMessage BskyMessage, bsky *bluesky.
284284
profile.AvatarURL = "https://up.erisa.uk/blueskydefaultavatar.png"
285285
}
286286

287+
// if the user has an invalid (unverified) handle, links with handles will break
288+
if profile.Handle == "handle.invalid" {
289+
profile.Handle = profile.DID
290+
}
291+
287292
return profile, nil
288293
}
289294

0 commit comments

Comments
 (0)