refactor(e2ee): restructure types a and method slightly

This commit is contained in:
dignifiedquire
2019-08-26 22:24:18 +02:00
committed by holger krekel
parent a5f862a564
commit 3944592c09
5 changed files with 481 additions and 510 deletions

View File

@@ -504,7 +504,7 @@ pub unsafe fn dc_handle_securejoin_handshake(
could_not_establish_secure_connection(
context,
contact_chat_id,
if 0 != mimeparser.e2ee_helper.encrypted {
if mimeparser.e2ee_helper.encrypted {
b"No valid signature.\x00" as *const u8 as *const libc::c_char
} else {
b"Not encrypted.\x00" as *const u8 as *const libc::c_char
@@ -943,7 +943,7 @@ unsafe fn encrypted_and_signed(
mimeparser: &dc_mimeparser_t,
expected_fingerprint: impl AsRef<str>,
) -> bool {
if 0 == mimeparser.e2ee_helper.encrypted {
if !mimeparser.e2ee_helper.encrypted {
warn!(mimeparser.context, 0, "Message not encrypted.",);
return false;
}