mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +03:00
feat: lookup_key_contact_by_address(): Allow looking up ContactId::SELF without chat id
This doesn't fix anything currently, but let's allow such lookups to avoid future bugs.
This commit is contained in:
@@ -5436,3 +5436,15 @@ async fn test_small_unencrypted_group() -> Result<()> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_lookup_key_contact_by_address_self() -> Result<()> {
|
||||
let mut tcm = TestContextManager::new();
|
||||
let t = &tcm.alice().await;
|
||||
let addr = &t.get_config(Config::Addr).await?.unwrap();
|
||||
assert_eq!(
|
||||
lookup_key_contact_by_address(t, addr, None).await?,
|
||||
Some(ContactId::SELF)
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user