How are you querying users names? Does the database store that info? I thought it was just npubs in hex? Or are you manually adding user names?

Reply to this note

Please Login to reply.

Discussion

The relay provides a table for users that broadcast metadata update on the relay.

What I did is to fetch the username if the npub did an update of the metadata on the relay, otherwise the pubkey of the user is displayed as hex.

Erratum : the user data is not stored on a specific table, thus the relay records metadata events. I cross the data when possible, same way

The key is to play with subqueries and event kinds