Currently, $LAZY only sends down membership events for senders of events in the timeline (if the membership hasn't previously been sent down). In particular, that means if a user's state changes and it is not in the timeline, then the client won't know the membership state has changed / been invalidated.
To make things easier for clients, lets change $LAZY to also send down all membership changes in non-gappy syncs (i.e. when limited: false). This allows clients to cache the membership list for as long as it doesn't get a gappy sync, but still ensures for large gaps the server doesn't need to send down all membership changes.
Currently,
$LAZYonly sends down membership events for senders of events in the timeline (if the membership hasn't previously been sent down). In particular, that means if a user's state changes and it is not in the timeline, then the client won't know the membership state has changed / been invalidated.To make things easier for clients, lets change
$LAZYto also send down all membership changes in non-gappy syncs (i.e. whenlimited: false). This allows clients to cache the membership list for as long as it doesn't get a gappy sync, but still ensures for large gaps the server doesn't need to send down all membership changes.