Fix: JMAP identities should not return null signatures
This commit is contained in:
@@ -81,7 +81,7 @@ impl JMAP {
|
|||||||
response.not_found.push(id.into());
|
response.not_found.push(id.into());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let mut push = if let Some(push) = self
|
let mut identity = if let Some(identity) = self
|
||||||
.get_property::<Object<Value>>(
|
.get_property::<Object<Value>>(
|
||||||
account_id,
|
account_id,
|
||||||
Collection::Identity,
|
Collection::Identity,
|
||||||
@@ -90,7 +90,7 @@ impl JMAP {
|
|||||||
)
|
)
|
||||||
.await?
|
.await?
|
||||||
{
|
{
|
||||||
push
|
identity
|
||||||
} else {
|
} else {
|
||||||
response.not_found.push(id.into());
|
response.not_found.push(id.into());
|
||||||
continue;
|
continue;
|
||||||
@@ -104,8 +104,17 @@ impl JMAP {
|
|||||||
Property::MayDelete => {
|
Property::MayDelete => {
|
||||||
result.append(Property::MayDelete, Value::Bool(true));
|
result.append(Property::MayDelete, Value::Bool(true));
|
||||||
}
|
}
|
||||||
|
Property::TextSignature | Property::HtmlSignature => {
|
||||||
|
result.append(
|
||||||
|
property.clone(),
|
||||||
|
identity
|
||||||
|
.properties
|
||||||
|
.remove(property)
|
||||||
|
.unwrap_or(Value::Text(String::new())),
|
||||||
|
);
|
||||||
|
}
|
||||||
property => {
|
property => {
|
||||||
result.append(property.clone(), push.remove(property));
|
result.append(property.clone(), identity.remove(property));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ impl SMTP {
|
|||||||
tracing::error!(
|
tracing::error!(
|
||||||
context = "report",
|
context = "report",
|
||||||
event = "error",
|
event = "error",
|
||||||
"Failed to write DMARC report event: {}",
|
"Failed to write TLS report event: {}",
|
||||||
err
|
err
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user