skip getProfile if no did
This commit is contained in:
@@ -20,8 +20,12 @@ export function useUpdateProfileVerificationCache() {
|
|||||||
return useCallback(
|
return useCallback(
|
||||||
async ({profile}: {profile: bsky.profile.AnyProfileView}) => {
|
async ({profile}: {profile: bsky.profile.AnyProfileView}) => {
|
||||||
try {
|
try {
|
||||||
|
if (!profile.did) {
|
||||||
|
logger.warn(`useUpdateProfileVerificationCache: no did`, {profile})
|
||||||
|
return
|
||||||
|
}
|
||||||
const updated = await client.call(app.bsky.actor.getProfile, {
|
const updated = await client.call(app.bsky.actor.getProfile, {
|
||||||
actor: (profile.did ?? '') as DidString,
|
actor: profile.did as DidString,
|
||||||
})
|
})
|
||||||
updateProfileShadow(qc, profile.did, {
|
updateProfileShadow(qc, profile.did, {
|
||||||
verification: updated.verification,
|
verification: updated.verification,
|
||||||
|
|||||||
Reference in New Issue
Block a user