matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

Return an immutable value from get_latest_event_ids_in_room. #16326

Closed clokep closed 1 year ago

clokep commented 1 year ago

Spun out of #14911, this changes the return type to an immutable value. Turns out all the callers actually wanted a set so instead of List[str] (or StrSequence) we can return FrozenSet[str]). This also should do less work since we cache exactly what we want and do less set(...) of the return value.