updatePermissions method
Update the Permissions of the Remote Peer in the Room. This will emit an event updated
with the updated permissions.
Implementation
void updatePermissions(Map<String, dynamic> data) {
if (!checkPermission(permissionTypeCheck: PermissionType.admin)) {
return;
}
try {
logger.i('🔔 Updating Permissions | data -> $data');
LocalPeer localPeer = LocalPeer.getInstance();
Socket socket = localPeer.socket;
socket.publish(Request_Request.updatePeerPermission, {
'peerId': peerId,
'permission': data,
});
} catch (error) {
logger.e('🔔 Error Updating Permissions | Error -> $error');
}
}