Get DisplayName for Presences?

I noticed that the Presence Struct (at least in the C++ client) does not include the user’s display name.]

Can anyone advise on how to handle this? If my app makes use of Display names, when when a user joins/leaves a match the relevant notification for the user should display their Display Name. But the display name is not included in the Presence Object.

The obvious way to address this is to iterate through the presence list and do a “get user info” call for each one. But that seems like it would generate a lot of unnecessary traffic.

I’m curious if there’s a better way? Or if there are some design reasons not to include the user’s display name in their Presence object? Perhaps I’m misunderstanding the purpose of display names?

Thanks for any input.

The main design consideration there is to avoid sending unnecessary data. Most games use usernames, so that’s included for convenience, but we can’t include every user account field in presence information every time.

You should fetch user info by user ID, but you don’t need to do it one by one. You can submit multiple user IDs and get all their user records in one batch operation.