Skip to content

Allow returning user IDs from useParticipantIds #7

Description

@rileyjshaw

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions