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

Feed events to widgets as they are decrypted (even if out of order) #28376

Merged
merged 3 commits into from
Nov 8, 2024

Commits on Nov 7, 2024

  1. Refactor feeding of events to widgets

    This is a pure refactor with (hopefully) no behavior changes.
    robintown committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    7b998dc View commit details
    Browse the repository at this point in the history
  2. Feed events to widgets as they are decrypted (even if out of order)

    The code that feeds events to widgets tries to enforce that only events from the end of the timeline will be passed through. This is to prevent old, irrelevant events from being passed to widgets as the timeline is back-filled. However, since encrypted events need to be decrypted asynchronously, it's not possible to feed them to a widget in a strictly linear order without introducing some kind of blocking or unreliable delivery. This code has been dropping events when they're decrypted out of order, which we consider to be an undesirable behavior.
    
    The solution provided here is that, to reflect the asynchronous nature of decryption, encrypted events that arrive at the end of the timeline will be fed to a widget whenever they finish decrypting, even if this means feeding them out of order. For now we're not aware of any widgets that care about knowing the exact order of events in the timeline, but if such a need reveals itself later, we can explore adding ordering information to this part of the widget API.
    robintown committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ef55f1d View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. Add braces to if

    robintown committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    6a0c357 View commit details
    Browse the repository at this point in the history