skillHasOnlySafeProperties function

bool skillHasOnlySafeProperties(
  1. Map<String, dynamic> commandData
)

Check if a skill command only uses safe properties (auto-allow).

Implementation

bool skillHasOnlySafeProperties(Map<String, dynamic> commandData) {
  for (final key in commandData.keys) {
    if (_safeSkillProperties.contains(key)) continue;
    final value = commandData[key];
    if (value == null) continue;
    if (value is List && value.isEmpty) continue;
    if (value is Map && value.isEmpty) continue;
    return false;
  }
  return true;
}