mirror of
https://github.com/chatmail/core.git
synced 2026-05-10 18:36:29 +03:00
feat: get contact-id for info messages (#6714)
instead of showing addresses in info message, provide an API to get the contact-id. UI can then make the info message tappable and open the contact profile in scope the corresponding iOS PR - incl. **screencast** - is at https://github.com/deltachat/deltachat-ios/pull/2652 ; jsonrpc can come in a subsequent PR when things are settled on android/ios the number of parameters in `add_info_msg_with_cmd` gets bigger and bigger, however, i did not want to refactor this in this PR. it is also not really adding complexity closes #6702 --------- Co-authored-by: link2xt <link2xt@testrun.org> Co-authored-by: Hocuri <hocuri@gmx.de>
This commit is contained in:
@@ -54,10 +54,7 @@ async fn test_stock_string_repl_str() {
|
||||
.unwrap();
|
||||
let contact = Contact::get_by_id(&t.ctx, contact_id).await.unwrap();
|
||||
// uses %1$s substitution
|
||||
assert_eq!(
|
||||
contact_verified(&t, &contact).await,
|
||||
"Someone (someone@example.org) verified."
|
||||
);
|
||||
assert_eq!(contact_verified(&t, &contact).await, "Someone verified.");
|
||||
// We have no string using %1$d to test...
|
||||
}
|
||||
|
||||
@@ -95,7 +92,7 @@ async fn test_stock_system_msg_add_member_by_me_with_displayname() {
|
||||
);
|
||||
assert_eq!(
|
||||
msg_add_member_local(&t, "alice@example.org", ContactId::SELF).await,
|
||||
"You added member Alice (alice@example.org)."
|
||||
"You added member Alice."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -112,7 +109,7 @@ async fn test_stock_system_msg_add_member_by_other_with_displayname() {
|
||||
};
|
||||
assert_eq!(
|
||||
msg_add_member_local(&t, "alice@example.org", contact_id,).await,
|
||||
"Member Alice (alice@example.org) added by Bob (bob@example.com)."
|
||||
"Member Alice added by Bob."
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user