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: always set correct chat_id for DC_EVENT_REACTIONS_CHANGED #5419

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

r10s
Copy link
Member

@r10s r10s commented Apr 1, 2024

this PR sets correct chat_id for DC_EVENT_REACTIONS_CHANGED events.

detection of correct chat-id went wrong sometimes somewhere deep inside receive_imf(), i tried the most less intrusive fix (changing is_probably_private_reply(), see commit message for details) with probably few side effects, as changing too many things in receive_imf() with good chance raises other issues :)

also, it the is_probably_private_reply() seems to be really the cause, changing receive_imf() in a way that without allow_creation the correct chat is still returned may be an alternative, however, feels wrong as it works around somehow and seems not be needed otherwise. also, it would need a deeper understanding of receive_imf() where i currently do not have the mindset for :)

closes #5418

r10s added 2 commits April 2, 2024 01:59
`is_probably_private_reply()` checks
if a message should better go to the one to one chat
instead of the chat already identified by the `In-Reply-To`.
this functionality is needed to make "Reply Privately" work.

however, this functionality is never true for reactions.
if we would return `true` here, own reactions seen by a second device
would not get the correct chat assiged.
@r10s r10s force-pushed the r10s/fix-multi-device-reactions branch from 5f965f5 to 3f315fe Compare April 1, 2024 23:59
@r10s r10s requested review from iequidoo and link2xt April 2, 2024 00:00
@r10s r10s marked this pull request as ready for review April 2, 2024 00:08
@r10s r10s merged commit 375fcbd into main Apr 2, 2024
38 checks passed
@r10s r10s deleted the r10s/fix-multi-device-reactions branch April 2, 2024 20:33
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.

DC_EVENT_REACTIONS_CHANGED has chat_id unset for multi-device setup
2 participants