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

fix: disable fetch_existing_msgs setting by default #4423

Merged
merged 1 commit into from Jun 1, 2023

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented May 24, 2023

This caused too many problems after switching the default setting for show_emails from DC_SHOW_EMAILS_OFF to DC_SHOW_EMAILS_ALL in #4019

There is a topic https://support.delta.chat/t/setting-no-chats-only-for-show-classic-e-mails-showing-classic-emails/2481 on the forum with multiple requests to revert this setting due to old emails being downloaded.

Note that this does not disable fetching existing contacts.

@link2xt
Copy link
Collaborator Author

link2xt commented May 24, 2023

Another option would be to revert the show_emails setting directly.

This caused too many problems after switching
the default setting for `show_emails`
from DC_SHOW_EMAILS_OFF to DC_SHOW_EMAILS_ALL
in <#4019>

There is a topic <https://support.delta.chat/t/setting-no-chats-only-for-show-classic-e-mails-showing-classic-emails/2481>
on the forum with multiple requests to revert this setting
due to old emails being downloaded.
@link2xt link2xt force-pushed the link2xt/disable-fetch-existing-msgs branch from 7a521d7 to 227396c Compare May 31, 2023 19:01
@link2xt
Copy link
Collaborator Author

link2xt commented May 31, 2023

There was a related fix to the bug that may have caused download of >100 messages which may have been the reason for negative reports on this feature: #4383

@link2xt
Copy link
Collaborator Author

link2xt commented May 31, 2023

This feature is by the way buggy because it first processes the whole Inbox, then the whole Sent folder. This way Delta Chat is unable to assign messages to the chats properly, as every time Reply-To field of the incoming message refers to the outgoing message, outgoing message is not processed yet and will only be processed after finishing the Inbox.

If we want to reintroduce fetch_existing_msgs, this should probably be a separate function that does prefetch on both the Inbox and Sent folders first, filters out messages that are >1 year old, sorts them all by internal date and downloads from oldest to newest.

@link2xt link2xt merged commit 3eddc91 into stable-1.112 Jun 1, 2023
21 checks passed
@link2xt link2xt deleted the link2xt/disable-fetch-existing-msgs branch June 1, 2023 11:11
@Hocuri
Copy link
Collaborator

Hocuri commented Jun 1, 2023

Note that from a user perspective, it's not only disabled by default, but completely, since there's no way to turn it on. So, if it turns out that this isn't missed by too many users, we should just remove the code completely.

@link2xt
Copy link
Collaborator Author

link2xt commented Jun 1, 2023

Note that from a user perspective, it's not only disabled by default, but completely, since there's no way to turn it on. So, if it turns out that this isn't missed by too many users, we should just remove the code completely.

It was already effectively disabled before #4019 (enabling download of non-chat mails by default) because new users had no chat messages in the inbox and Delta Chat fetched only old chat messages. So in most cases users got no messages in the new setup and maybe only some old chat messages that happened to be unencrypted which is arguably worse than nothing. Now that this feature started doing something, users have problems when setting up a new account and get a huge number of contact requests.

The only users who could have noticed this working were DeltaLab users which already had non-chat mails enabled by default, but it was mostly used with nauta.cu which has fetch_existing_msgs=0 in the provider database.

If we reintroduce fetch_existing_msgs=1, I think we need to split it into a separate function that works on both the Inbox and Sent at the same time, makes sure not to download extremely old messages (like I got some messages dated 2020 as a contact request), downloads them sorted by internaldate, and actually test that it works nicely when setting up a new account on an existing actively used email account.

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.

None yet

4 participants