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: assign messages to chats based on not fully downloaded references #5458

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Apr 11, 2024

Fixes #5347

@link2xt link2xt force-pushed the link2xt/parent-download-message branch 3 times, most recently from 5ea05e2 to bea2193 Compare April 11, 2024 19:24
@link2xt link2xt requested a review from iequidoo April 11, 2024 19:24
@link2xt link2xt marked this pull request as ready for review April 11, 2024 19:24
@link2xt link2xt requested a review from Simon-Laux April 11, 2024 19:28
src/chat.rs Outdated
{
// If `msg` is not fully downloaded or undecipherable, it may have been assigned to the
if msg.download_state == DownloadState::Undecipherable {
// If `msg` is not undecipherable, it may have been assigned to the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Partially downloaded messages are also potentially undecipherable. The only difference is that we can download them and (likely) validate their assignment to chat. Maybe just remove this comment?

@link2xt link2xt force-pushed the link2xt/parent-download-message branch from bea2193 to 18714ee Compare April 12, 2024 00:57
{
// If `msg` is not fully downloaded or undecipherable, it may have been assigned to the
// wrong chat (they often get assigned to the 1:1 chat with the sender).
if msg.download_state == DownloadState::Undecipherable {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing this condition breaks existing Python test test_undecipherable_group. We can also remove it and adjust the test, but I wanted to minimize the changes so e.g. if user has no download limit everything works the same as before.

@link2xt link2xt merged commit 0aea7d1 into main Apr 12, 2024
38 checks passed
@link2xt link2xt deleted the link2xt/parent-download-message branch April 12, 2024 01:19
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.

Receiving multiple large messages in a row result in creation of "..." group
2 participants