updatePermissions method
Update the Permissions of the Local Peer in the Room. This will emit an event updated
with the updated permissions.
NOTE: If the Peer is not an admin, then the permissions will not be updated on the server
Implementation
void updatePermissions(Map updatedPermissions) {
permissionsValueNotifier.value = {
'admin': updatedPermissions['admin'],
'canConsume': updatedPermissions['canConsume'],
'canProduce': updatedPermissions['canProduce'],
'canProduceSources': updatedPermissions['canProduceSources'],
'canSendData': updatedPermissions['canSendData'],
'canRecvData': updatedPermissions['canRecvData'],
'canUpdateMetadata': updatedPermissions['canUpdateMetadata'],
'role': updatedPermissions['role'] ?? role,
};
logger.i("🔔 Updating Permissions => ${permissionsValueNotifier.value}");
emit("updated", {
permissionsValueNotifier.value: acl,
});
}