Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The return from agent.getProfile fails AppBskyActorProfile.isRecord() #3071

Open
OracPrime opened this issue Nov 22, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@OracPrime
Copy link

If I call
const data=agent.getProfile({ actor: agent.did });
Then I expect this call to return true
AppBskyActorProfile.isRecord(data)

It doesn't. data contains the fields you would expect, but the code generated for isRecord expects a type$ member:

export function isRecord(v: unknown): v is Record {
  return (
    isObj(v) &&
    hasProp(v, '$type') &&
    (v.$type === 'app.bsky.actor.profile#main' ||
      v.$type === 'app.bsky.actor.profile')
  )
}

Note: I'm new to atproto development - give serious consideration to me having just missed the point!

@OracPrime OracPrime added the bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant