Skip to content
Snippets Groups Projects
  • Benjamin Lee's avatar
    81cd677b
    fix dropped events in search · 81cd677b
    Benjamin Lee authored and 🥺's avatar 🥺 committed
    
    The previous code would drop some events entirely if any events between
    `skip` and `skip + limit` were not visible to the user. This would cause
    the set of events skipped by the `skip(skip)` method to extend past
    `skip` in the raw result set, because `skip(skip)` was being called
    *after* filtering out invisible events.
    
    This bug will become much more severe with a full filtering
    implementation, because it will be more likely for events to be filtered
    out. Currently, it is only possible to trigger with rooms that have
    history visibility set to "invited" or "joined".
    
    Signed-off-by: default avatarstrawberry <strawberry@puppygock.gay>
    81cd677b
    History
    fix dropped events in search
    Benjamin Lee authored and 🥺's avatar 🥺 committed
    
    The previous code would drop some events entirely if any events between
    `skip` and `skip + limit` were not visible to the user. This would cause
    the set of events skipped by the `skip(skip)` method to extend past
    `skip` in the raw result set, because `skip(skip)` was being called
    *after* filtering out invisible events.
    
    This bug will become much more severe with a full filtering
    implementation, because it will be more likely for events to be filtered
    out. Currently, it is only possible to trigger with rooms that have
    history visibility set to "invited" or "joined".
    
    Signed-off-by: default avatarstrawberry <strawberry@puppygock.gay>