Improve Chat.get_encryption_info() format

Group contacts by peerstate and make it easier
to find contacts that prevent encryption by sorting them
to the top of the list.
This commit is contained in:
link2xt
2022-05-13 21:09:53 +00:00
committed by holger krekel
parent c9beaa2aa1
commit 8168bcece5
5 changed files with 98 additions and 20 deletions

View File

@@ -889,7 +889,7 @@ impl Contact {
};
ret += &format!(
"{}\n{}:",
"{}.\n{}:",
stock_message,
stock_str::finger_prints(context).await
);
@@ -1961,7 +1961,7 @@ mod tests {
.await?;
let encrinfo = Contact::get_encrinfo(&alice, contact_bob_id).await?;
assert_eq!(encrinfo, "No encryption.");
assert_eq!(encrinfo, "No encryption");
let bob = TestContext::new_bob().await;
let chat_alice = bob