-
-
Notifications
You must be signed in to change notification settings - Fork 103
Generate rfc724_mid when creating Message #6704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cca3289
Generate rfc724_mid when creating Message
Septias b064d22
remove log
Septias 9f5df65
remove default usage
Septias 06bfca7
add test
Septias 1613971
test no double send
Septias 14914ac
improve test
Septias d24afce
fix: no double send
Septias 474ce76
improve test
Septias 1e23712
add to test & cleanup
Septias 27a452a
fix test
Septias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -135,7 +135,7 @@ async fn test_get_width_height() { | |
} | ||
|
||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
async fn test_quote() { | ||
async fn test_quote_basic() { | ||
let d = TestContext::new().await; | ||
let ctx = &d.ctx; | ||
|
||
|
@@ -144,13 +144,10 @@ async fn test_quote() { | |
.unwrap(); | ||
|
||
let chat = d.create_chat_with_contact("", "[email protected]").await; | ||
|
||
let mut msg = Message::new_text("Quoted message".to_string()); | ||
|
||
// Send message, so it gets a Message-Id. | ||
assert!(msg.rfc724_mid.is_empty()); | ||
Septias marked this conversation as resolved.
Show resolved
Hide resolved
|
||
let msg_id = chat::send_msg(ctx, chat.id, &mut msg).await.unwrap(); | ||
let msg = Message::load_from_db(ctx, msg_id).await.unwrap(); | ||
// Message has to be sent such that it gets saved to db. | ||
chat::send_msg(ctx, chat.id, &mut msg).await.unwrap(); | ||
assert!(!msg.rfc724_mid.is_empty()); | ||
|
||
let mut msg2 = Message::new(Viewtype::Text); | ||
|
@@ -358,6 +355,7 @@ async fn test_markseen_msgs() -> Result<()> { | |
let sent1 = alice.send_msg(alice_chat.id, &mut msg).await; | ||
let msg1 = bob.recv_msg(&sent1).await; | ||
let bob_chat_id = msg1.chat_id; | ||
let mut msg = Message::new_text("this is the text!".to_string()); | ||
let sent2 = alice.send_msg(alice_chat.id, &mut msg).await; | ||
let msg2 = bob.recv_msg(&sent2).await; | ||
assert_eq!(msg1.chat_id, msg2.chat_id); | ||
|
@@ -380,9 +378,11 @@ async fn test_markseen_msgs() -> Result<()> { | |
|
||
// bob sends to alice, | ||
// alice knows bob and messages appear in normal chat | ||
let mut msg = Message::new_text("this is the text!".to_string()); | ||
let msg1 = alice | ||
.recv_msg(&bob.send_msg(bob_chat_id, &mut msg).await) | ||
.await; | ||
let mut msg = Message::new_text("this is the text!".to_string()); | ||
let msg2 = alice | ||
.recv_msg(&bob.send_msg(bob_chat_id, &mut msg).await) | ||
.await; | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.