fix: Set default value for email and SMS rule to all instead of none (#2754)

This commit is contained in:
Lénaïc Grolleau 2024-02-27 18:28:59 +01:00 committed by GitHub
parent 5a0d1bcb6e
commit 6c76913f71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,6 +76,11 @@ class ProviderTable extends React.Component {
this.updateField(table, index, "name", value);
const provider = Setting.getArrayItem(this.props.providers, "name", value);
this.updateField(table, index, "provider", provider);
// If the provider is email or SMS, set the rule to "all" instead of the default "None"
if (provider.category === "Email" || provider.category === "SMS") {
this.updateField(table, index, "rule", "all");
}
}} >
{
Setting.getDeduplicatedArray(this.props.providers, table, "name").map((provider, index) => <Option key={index} value={provider.name}>{provider.name}</Option>)