mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-13 07:24:15 +08:00
Fix: JMAP identities should not return null signatures
This commit is contained in:
parent
7328ba8dd5
commit
7535caf5da
2 changed files with 13 additions and 4 deletions
|
@ -81,7 +81,7 @@ impl JMAP {
|
|||
response.not_found.push(id.into());
|
||||
continue;
|
||||
}
|
||||
let mut push = if let Some(push) = self
|
||||
let mut identity = if let Some(identity) = self
|
||||
.get_property::<Object<Value>>(
|
||||
account_id,
|
||||
Collection::Identity,
|
||||
|
@ -90,7 +90,7 @@ impl JMAP {
|
|||
)
|
||||
.await?
|
||||
{
|
||||
push
|
||||
identity
|
||||
} else {
|
||||
response.not_found.push(id.into());
|
||||
continue;
|
||||
|
@ -104,8 +104,17 @@ impl JMAP {
|
|||
Property::MayDelete => {
|
||||
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 => {
|
||||
result.append(property.clone(), push.remove(property));
|
||||
result.append(property.clone(), identity.remove(property));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -498,7 +498,7 @@ impl SMTP {
|
|||
tracing::error!(
|
||||
context = "report",
|
||||
event = "error",
|
||||
"Failed to write DMARC report event: {}",
|
||||
"Failed to write TLS report event: {}",
|
||||
err
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue