Skip to content

fix: Fail receive_imf to not tombstone reaction if the referenced message isn't found#8181

Open
iequidoo wants to merge 3 commits intomainfrom
iequidoo/dont-tombstone-orphaned-reaction
Open

fix: Fail receive_imf to not tombstone reaction if the referenced message isn't found#8181
iequidoo wants to merge 3 commits intomainfrom
iequidoo/dont-tombstone-orphaned-reaction

Conversation

@iequidoo
Copy link
Copy Markdown
Collaborator

@iequidoo iequidoo commented Apr 27, 2026

A reaction may arrive earler than the referenced message in case of multi-transport. By not creating a tombstone we still can receive it later on another transport.

There are also the same fixes for Iroh-Node-Addr and Chat-Edit messages. Going to add corresponding tests if the approach is agreed.
Related to #7984

@iequidoo iequidoo marked this pull request as ready for review April 28, 2026 03:41
@Hocuri
Copy link
Copy Markdown
Collaborator

Hocuri commented Apr 28, 2026

Won't an error device message be added if receive_imf returns an Err? Seems unlikely that we want to do this whenever a reaction arrives early.

@iequidoo iequidoo marked this pull request as draft April 28, 2026 15:19
@iequidoo iequidoo force-pushed the iequidoo/dont-tombstone-orphaned-reaction branch from ef2a1ba to a47c8a4 Compare April 28, 2026 16:48
@iequidoo
Copy link
Copy Markdown
Collaborator Author

Won't an error device message be added if receive_imf returns an Err? Seems unlikely that we want to do this whenever a reaction arrives early.

Decided to add some text-based error handling instead of complicating the receive_imf logic and added a check to the test.

@iequidoo iequidoo marked this pull request as ready for review April 28, 2026 16:51
Comment thread src/imap.rs
warn!(context, "receive_imf error: {err}.");
if !err.contains("(SKIP_DEVICE_MSG)") {
let text = format!(
"❌ Failed to receive a message: {err}. Core version v{DC_VERSION_STR}. Please report this bug to delta@merlinux.eu or https://support.delta.chat/",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed "." from the end because Android displays it as a part of URL

…sage isn't found

A reaction may arrive earler than the referenced message in case of multi-transport. By not creating
a tombstone we still can receive it later on another transport.
@iequidoo iequidoo force-pushed the iequidoo/dont-tombstone-orphaned-reaction branch from a47c8a4 to e82f347 Compare April 28, 2026 17:18
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