Open
Conversation
BREAKING CHANGE: previously this event only fired if message state really did just transition from `DC_STATE_OUT_DELIVERED` to `DC_STATE_OUT_MDN_RCVD`. Now this is only the case for `MsgRead` events that have the newly added `first_time == true`. Closes deltachat/deltachat-desktop#5220. This is also useful for channels as it facilitates updating the post (message) read count live. Despite the fact that it's a breaking change, this should not be problematic in most cases because clients mostly use this event as an "it's time to reload" indicator. There is a case in Delta Chat Desktop where and adjustment will be needed: https://github.com/deltachat/deltachat-desktop/blob/d1fbb309793934b3ca09ed5a0266b6c84e333dd0/packages/frontend/src/stores/messagelist.ts#L119-L123 It seems that the message state could later transition to `DC_STATE_OUT_FAILED`, so we should not uncoditionally set it to `DC_STATE_OUT_MDN_RCVD`. Note that this does not expose `first_time` in CFFI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: previously this event only fired
if message state really did just transition
from
DC_STATE_OUT_DELIVEREDtoDC_STATE_OUT_MDN_RCVD.Now this is only the case for
MsgReadeventsthat have the newly added
first_time == true.Closes deltachat/deltachat-desktop#5220.
This is also useful for channels
as it facilitates updating the post (message) read count live.
Despite the fact that it's a breaking change,
this should not be problematic in most cases
because clients mostly use this event as an "it's time to reload"
indicator.
There is a case in Delta Chat Desktop where and adjustment
will be needed:
https://github.com/deltachat/deltachat-desktop/blob/d1fbb309793934b3ca09ed5a0266b6c84e333dd0/packages/frontend/src/stores/messagelist.ts#L119-L123
It seems that the message state could later transition
to
DC_STATE_OUT_FAILED, so we should not uncoditionally set itto
DC_STATE_OUT_MDN_RCVD.On Android I have also searched for the usages of this event,
and it seems that, without adjustments on Android side,
this would only cause excessive reloading:
It might also fix what seems to be a bug with "seen recently",
which on release Core doesn't get updated if the message
is already read:
https://github.com/deltachat/deltachat-android/blob/1894425ad2726fd21dde5275f5b137e6f3fb1499/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java#L1672-L1676
TODO:
first_timein CFFI. I guess we could, but only indc_event_get_data2_str. Would Android like that?And alternative is to introduce another event,
MsgReadV2. If the fact that this change is breaking is icky to you, let me know and I'll do that. It's easy.