-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat: add device message for imported contacts after configuration #6195
base: main
Are you sure you want to change the base?
Conversation
Add a short info message about how many contacts were added during configuration.
let mut msg = Message::new_text(format!( | ||
"Added {} contacts from outgoing chats", | ||
count | ||
)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a translated message
Seems like this crashes some tests because the device message is created at some point after configure when imap gets idle, so tests that rely on message order just get some random message. |
@@ -802,7 +804,7 @@ impl Imap { | |||
} | |||
|
|||
info!(context, "Done fetching existing messages."); | |||
Ok(()) | |||
Ok(created) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the device message right from this function? Otherwise it's strange that the function returns smth very particular, it's about messages, but returns the number of contacts
async fn add_all_recipients_as_contacts( | ||
context: &Context, | ||
session: &mut Session, | ||
folder: Config, | ||
) -> Result<()> { | ||
) -> Result<i32> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather say it should be usize
, but at least unsigned.
} | ||
Ok(count) => { | ||
let mut msg = Message::new_text(format!( | ||
"Added {} contacts from outgoing chats", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Added {} contacts from outgoing chats", | |
"Added {} contacts from outgoing messages.", |
It seems we don't have the term "outgoing chat", at least i don't see it in the core code / Delta Chat FAQ.
It seems there are only two tests failing, maybe they can be adapted? |
Add a short device message about how many contacts were added during configuration.
close #3299