Skip to content

feat(platform-client): getAvatar to fetch a user's profile picture - #28

Merged
ABujalance merged 1 commit into
mainfrom
feat/get-avatar
Jul 24, 2026
Merged

feat(platform-client): getAvatar to fetch a user's profile picture#28
ABujalance merged 1 commit into
mainfrom
feat/get-avatar

Conversation

@ABujalance

Copy link
Copy Markdown
Contributor

Adds PlatformClient.getAvatar(accountId) so apps (CDE, collaboration menus) can show member profile pictures. Returns the raw image Blob from the existing bearer-authed GET /account/:id/avatar route; callers turn it into an object URL. Also adds a responseType: 'blob' option to the base client's request() to support non-JSON responses.

Bearer/context auth only, so it lives on PlatformClient, not the token client.

Usage

const blob = await client.getAvatar(accountId);
const src = URL.createObjectURL(blob); // revoke when done

Rejects when the member has no avatar.

Changes

  • getAvatar(accountId): Promise<Blob> on PlatformClient
  • responseType: 'json' | 'blob' option on the base client request()
  • Unit test + changeset (minor)

Adds getAvatar(accountId) returning the image Blob from the existing bearer-authed GET /account/:id/avatar route, so apps can render member avatars. Also adds a responseType: 'blob' option to the base client request() for non-JSON responses.
@ABujalance
ABujalance merged commit 6ba1c20 into main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant