Hi again! Since my last feature request sparked some good discussion, I’m adding another idea.
Feature request
Add an idType param to useParticipantIds to allow returning user IDs, instead of the default behaviour which returns session IDs.
useParticipantIds({ idType: 'user' });
Why you need this
My application stores user data in a map keyed by participant user IDs. It would be really helpful to get a list of user IDs directly from this hook, rather than needing to store them in a separate callState object as shown here.
Alternatives you've considered
This could go into its own hook called useUserIds or useParticipantUserIds, but that feels a bit heavy vs. the above proposal.
Additional context
I can make a quick draft PR if this sounds useful.
Hi again! Since my last feature request sparked some good discussion, I’m adding another idea.
Feature request
Add an
idTypeparam to useParticipantIds to allow returning user IDs, instead of the default behaviour which returns session IDs.Why you need this
My application stores user data in a map keyed by participant user IDs. It would be really helpful to get a list of user IDs directly from this hook, rather than needing to store them in a separate
callStateobject as shown here.Alternatives you've considered
This could go into its own hook called
useUserIdsoruseParticipantUserIds, but that feels a bit heavy vs. the above proposal.Additional context
I can make a quick draft PR if this sounds useful.