Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to create instance of Participant.Identity #541

Closed
ming-chu opened this issue Jan 10, 2025 · 3 comments
Closed

Not able to create instance of Participant.Identity #541

ming-chu opened this issue Jan 10, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ming-chu
Copy link
Contributor

Describe the bug

It's not able to create Participant.Identity from String since the constructor was conflict with Decodable.

Participant.Identity(from: "my-id") // Error: Argument type 'String' does not conform to expected type 'Decoder'

Is that any workaround to init the instance from raw string id?

image

Thank you very much! Any comments or suggestions are appreciated!!

@ming-chu ming-chu added the bug Something isn't working label Jan 10, 2025
@hiroshihorie
Copy link
Member

I recall that the idea was to encourage safety by using objects from Room.remoteParticipants.identity instead of allowing the arbitrary creation of Identity types.

But this can be inconvenient for some app designs, I can make it public.

@ming-chu
Copy link
Contributor Author

Thank you for the response!

I think it will be more convenient for the RoomOptions at very beginning before we can get the ids from the list. ❤️
e.g set the DataPublishOptions.destinationIdentities in the RoomOptions.

I just submit a PR for this, please let me know if it looks ok to you or I can make the change further.

@ming-chu
Copy link
Contributor Author

fixed at PR #543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants