7
Views
2
Comments
Solved
[Azure Web PubSub] Add Multiple Users into the same group of azure Pubsub
azure-web-pubsub
Service icon
Forge asset by Stefan Weber

Hi,

Here I have been created one group named "Grape" from user "A" and make join of the same user to the same group (grape). Then make join another user named "Dhoni" To the same group which is named "grape". While joining it throws error like this . what can I do for this, How can i join multiple users to the same group.

Please guide me regarding this.

Thanks in-advance

Regards, SONA.



2021-10-09 07-57-44
Stefan Weber
 
MVP
Solution

Hi Sona,

unfortunately you are not writing when and where you add the new user. In Azure Web PubSub a user must be fully connected to the hub before you can add the user to a group.

It is best to do the join to group in the OnConnected event handler of the socket client. This makes it sure that the user is already "known" to the hub. Please note that PubSub does not store users permanently. A userid is only available as long as the connection is in connected state.

Best

Stefan

UserImage.jpg
Sona Suresh

thank you @Stefan Weber  for your reply.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.