mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
remove unneccessary check of is_special() + cleanups
This commit is contained in:
@@ -231,11 +231,7 @@ pub fn create_setup_code(_context: &Context) -> String {
|
||||
pub fn continue_key_transfer(context: &Context, msg_id: MsgId, setup_code: &str) -> Result<()> {
|
||||
ensure!(!msg_id.is_special(), "wrong id");
|
||||
|
||||
let msg = Message::load_from_db(context, msg_id);
|
||||
if msg.is_err() {
|
||||
bail!("Message is no Autocrypt Setup Message.");
|
||||
}
|
||||
let msg = msg.unwrap_or_default();
|
||||
let msg = Message::load_from_db(context, msg_id)?;
|
||||
ensure!(
|
||||
msg.is_setupmessage(),
|
||||
"Message is no Autocrypt Setup Message."
|
||||
|
||||
Reference in New Issue
Block a user