-
-
Notifications
You must be signed in to change notification settings - Fork 831
Feeds event with relation to unknown to the widget #12283
Feeds event with relation to unknown to the widget #12283
Conversation
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
0a95228
to
33f576c
Compare
if (!isRelationToUnknown) { | ||
// Ignore the event: it is before our interest. | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this seems reasonable, although maybe we should default to sending the event on if we can't find either the event or the receipt, rather than special-casing events whose parent we can't find? (ie. rename isBeforeMark
to shouldForward
or something, set it to true to start with and set it to false in the first clause rather than the second... and comment it, obviously).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed isBeforeMark
to shouldForward
that makes easier to understand this logic, but I can’t follow on the suggestion to change:
although maybe we should default to sending the event on if we can't find either the event or the receipt, rather than special-casing events whose parent we can't find
It not looks clear to me how event or the receipt find could resolve the same issue. Could you please explain more exactly what you mean with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dbkr could you please have a look on the changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I was just suggesting that, since the problem here is that we can't prove that the event is after the read marker because we can't find the event, we could also just default to forwarding if we can't prove the event hasn't been read, which I think would probably be safe enough. That said, this is a smaller change, so it seems fine.
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
Events that relate to unknown parent are not added to the timeline and therefore are not passed to the widget. Room timeline is used in
StopGapWidget
to check if event is before the marker in order to pass it.This PR suggests to ignore marker timeline logic for these events.
Checklist
Type: defect