-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Remove subject prefix from ad-hoc group names (#5385)
Delta Chat -style groups have names w/o prefixes like "Re: " even if the user is added to an already existing group, so let's remove prefixes from ad-hoc group names too. Usually it's not very important that the group is a classic email thread existed before, this info just eats up screen space. Also this way a group name is likely to preserve if the first message was missed.
- Loading branch information
Showing
2 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4228,6 +4228,33 @@ async fn test_keep_member_list_if_possibly_nomember() -> Result<()> { | |
Ok(()) | ||
} | ||
|
||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
async fn test_adhoc_grp_name_no_prefix() -> Result<()> { | ||
let mut tcm = TestContextManager::new(); | ||
let alice = &tcm.alice().await; | ||
let chat_id = receive_imf( | ||
alice, | ||
b"Subject: Re: Once upon a time this was with the only Re: here\n\ | ||
From: <[email protected]>\n\ | ||
To: <[email protected]>, <[email protected]>\n\ | ||
Date: Mon, 12 Dec 3000 14:32:39 +0000\n\ | ||
Message-ID: <[email protected]>\n\ | ||
In-Reply-To: <[email protected]>\n\ | ||
\n\ | ||
Adding Alice the Delta Chat lover", | ||
false, | ||
) | ||
.await? | ||
.unwrap() | ||
.chat_id; | ||
let chat = Chat::load_from_db(alice, chat_id).await.unwrap(); | ||
assert_eq!( | ||
chat.get_name(), | ||
"Once upon a time this was with the only Re: here" | ||
); | ||
Ok(()) | ||
} | ||
|
||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
async fn test_download_later() -> Result<()> { | ||
let mut tcm = TestContextManager::new(); | ||
|