Skip to content

fix: do not attempt to reference info messages #6023

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

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Oct 3, 2024

Info messages are added
at the beginning of unpromoted group chats
("Others will only see this group after you sent a first message."), may be created by WebXDC etc.

They are not sent outside
and have local Message-ID that
is not known to other recipients
so they should be skipped when constructing
In-Reply-To and References.

@link2xt link2xt requested a review from iequidoo October 3, 2024 20:57
@link2xt
Copy link
Collaborator Author

link2xt commented Oct 3, 2024

Due to another bug #5994 info messages were not actually used in In-Reply-To and message simply had no In-Reply-To when the last message in a chat is an info message. This I am going to fix in #6014

The test in this PR is failing without the fix, just in unexpected way. In-Reply-To appears to be empty instead of pointing to the info message.

src/chat.rs Outdated
@@ -1236,6 +1237,9 @@ impl ChatId {
// Do not reply to not fully downloaded messages. Such a message could be a group chat
// message that we assigned to 1:1 chat.
DownloadState::Done as u32,
// Do not reference info messages, they are not actually sent outside
Copy link
Collaborator

Choose a reason for hiding this comment

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

Grammar: Probably should be "sent out" instead of "sent outside"?

Info messages are added
at the beginning of unpromoted group chats
("Others will only see this group after you sent a first message."),
may be created by WebXDC etc.

They are not sent outside
and have local Message-ID that
is not known to other recipients
so they should be skipped when constructing
In-Reply-To and References.
@link2xt link2xt force-pushed the link2xt/dont-reference-info branch from f81b531 to 637a3f6 Compare October 3, 2024 21:34
@link2xt link2xt enabled auto-merge (rebase) October 3, 2024 21:40
@link2xt link2xt merged commit 46922d4 into main Oct 3, 2024
37 checks passed
@link2xt link2xt deleted the link2xt/dont-reference-info branch October 3, 2024 21:49
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.

2 participants