Add IMAP server ID to the context info only when it is known

This commit is contained in:
link2xt
2022-12-06 15:58:45 +00:00
parent fc386f4fa1
commit cacc01bac0
2 changed files with 4 additions and 3 deletions

View File

@@ -9,6 +9,7 @@
- Add more logging to `fetch_many_msgs` and refactor it #3811
- Small speedup #3780
- Log the reason when the message cannot be sent to the chat #3810
- Add IMAP server ID line to the context info only when it is known #3814
### API-Changes
- Add Python API to send reactions #3762

View File

@@ -614,9 +614,9 @@ impl Context {
res.insert("entered_account_settings", l.to_string());
res.insert("used_account_settings", l2.to_string());
let server_id = self.server_id.read().await;
res.insert("imap_server_id", format!("{:?}", server_id));
drop(server_id);
if let Some(server_id) = &*self.server_id.read().await {
res.insert("imap_server_id", format!("{:?}", server_id));
}
res.insert("secondary_addrs", secondary_addrs);
res.insert(