# Store the Discord name and avatar at sign-in \(\#217\) · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/c01bea87cea7d8d41b2d14703c48da3cc04f8459)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: c01bea87cea7d8d41b2d14703c48da3cc04f8459

Requested commit: c01bea87cea7d8d41b2d14703c48da3cc04f8459

Commit: c01bea87cea7d8d41b2d14703c48da3cc04f8459

Tree: 0abe4d0735d1328933df6e4b4021da56de717b1c

Author: Dara Adedeji

Committer: GitHub

## Message

```
Store the Discord name and avatar at sign-in (#217)

* Store the Discord name and avatar at sign-in

ensureCurrentUser read the standard name/picture claims, which Supabase
Discord sign-ins don't carry; the profile sits in user_metadata, which
Convex flattens into dotted keys. So every users row said "Discord user"
with no avatar. Sign-in and presence now read the profile through one
helper (convex/lib/profile.ts): Discord display name, full name, username,
the standard claims, then the email's local part.

Existing rows correct themselves the next time each person opens the app,
since ensureCurrentUser patches the row on every sign-in. No schema change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Regenerate Convex api types for lib/profile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
```

## Parents

- [87b10f9bd7d6b375ad1e86a58c6c462e85dda7f8](https://git.cafe/dara/icarus/commit/87b10f9bd7d6b375ad1e86a58c6c462e85dda7f8?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/c01bea87cea7d8d41b2d14703c48da3cc04f8459?format=markdown)
