Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Septias
Copy link
Collaborator

@Septias Septias commented Nov 10, 2024

Add a short device message about how many contacts were added during configuration.

close #3299

Add a short info message about how many contacts were added during
configuration.
Comment on lines +522 to +525
let mut msg = Message::new_text(format!(
"Added {} contacts from outgoing chats",
count
));
Copy link
Collaborator Author

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

@Septias
Copy link
Collaborator Author

Septias commented Nov 11, 2024

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)
Copy link
Collaborator

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> {
Copy link
Collaborator

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",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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.

@iequidoo
Copy link
Collaborator

iequidoo commented Dec 2, 2024

It seems there are only two tests failing, maybe they can be adapted?

@Septias
Copy link
Collaborator Author

Septias commented Dec 3, 2024

I think we still need an irl discussion about how/if we really want this as it is quite a big change for new users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trigger a device message about automatic adding of contacts
2 participants