Dear Livekit Team,
I'm working on a meeting application utilizing the Livekit Swift client SDK. We're encountering an issue where RoomData messages are not reaching participants after we dynamically update their permissions.
Problem: After granting participants permissions for subscription and publishing, RoomData messages sent through the server SDK are not received by Swift client users, whereas Android and web SDK users receive them correctly.
Steps to Recreate the Issue:
1. Create a token with initial permissions set to false:
livekit-cli create-token --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --join --room room --identity user --grant '{"canSubscribe":false,"canPublish":false,"canPublishData":false}'
2. Join the room using the Livekit iOS demo app.
3. Update the participant's permissions to set 'canPublish' and 'canSubscribe' to true:
livekit-cli update-participant --url wss://demo-s8zwk6eo.livekit.cloud/ --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --room room --identity user --permissions '{"can_subscribe":true,"can_publish":true}'
4. Try sending data to the room. Expected behavior is that this participant should receive the data, but the observed behavior is that this participant does not receive the data. This issue of not receiving RoomData messages only occurs when the initial permissions of the participants are set to false.
livekit-cli send-data --url wss://demo-s8zwk6eo.livekit.cloud/ --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --room room --data "data"
Note: The same message is received by the iOS Swift user when the initial create token method is called with canSubscribe and canPublish permissions set to true.
Below are attached images:
Web receiving data message after permissions are updated to canSubscribe and canPublish true
Web receiving data messages when intial permissions of canSubscribe, canPublish and canPublishData are set to false
IOS not receiving the data message even after permissions are updated to canSubscribe and canPublish true
IOS receiving the data message when the intial create token canPublish and canSubscribe permissions are set to true
Note: We are okay with that failed to decode data error, as in our application we are handling received data messages differently compared to livekit demo app.
Your prompt attention to this matter is highly appreciated. If more information or specific code examples are required to diagnose and address this issue, please let us know.
Dear Livekit Team, I'm working on a meeting application utilizing the Livekit Swift client SDK. We're encountering an issue where RoomData messages are not reaching participants after we dynamically update their permissions. Problem: After granting participants permissions for subscription and publishing, RoomData messages sent through the server SDK are not received by Swift client users, whereas Android and web SDK users receive them correctly. Steps to Recreate the Issue:
1. Create a token with initial permissions set to false: livekit-cli create-token --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --join --room room --identity user --grant '{"canSubscribe":false,"canPublish":false,"canPublishData":false}'
2. Join the room using the Livekit iOS demo app.
3. Update the participant's permissions to set 'canPublish' and 'canSubscribe' to true: livekit-cli update-participant --url wss://demo-s8zwk6eo.livekit.cloud/ --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --room room --identity user --permissions '{"can_subscribe":true,"can_publish":true}'
4. Try sending data to the room. Expected behavior is that this participant should receive the data, but the observed behavior is that this participant does not receive the data. This issue of not receiving RoomData messages only occurs when the initial permissions of the participants are set to false. livekit-cli send-data --url wss://demo-s8zwk6eo.livekit.cloud/ --api-key API4cb8pbrAQPL8 --api-secret pMNZzkNWfUUzIeDmEUtul9vFQOT8T3amf52c5JfprYND --room room --data "data"
Note: The same message is received by the iOS Swift user when the initial create token method is called with canSubscribe and canPublish permissions set to true. Below are attached images:
Note: We are okay with that failed to decode data error, as in our application we are handling received data messages differently compared to livekit demo app. Your prompt attention to this matter is highly appreciated. If more information or specific code examples are required to diagnose and address this issue, please let us know.