element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.23k stars 2k forks source link

Going back in history with LL sometimes makes avatars/displaynames fallback to mxid #7417

Open bwindels opened 6 years ago

bwindels commented 6 years ago

Matthew saw it on #Riot when scrolling back a good day dpwqvhbhrcntxqqxeqdoipjq

Matthew: also, no profile data for bruno there :/ (having scrollbacked in the room after refreshing the client to turn on LL on /develop yesterday)

bwindels commented 6 years ago

This message btw: https://matrix.to/#/!iNmaIQExDMeqdITdHH:matrix.org/$1538058225345224xpkNQ:matrix.org

bwindels commented 6 years ago

I thought I had found the cause for this as MatrixClient::scrollback() obviously does the wrong thing (should be oldState as it's adding events to the beginning of the live timeline) but this code is actually never used (should remove it).

Scrolling back happens through MatrixClient::paginateEventTimeline but there everything seems fine and dandy. We know it happens, but it's very hard to reproduce and can't currently think of how it would happen.

The sentinel gets requested from the directional roomstate from the timeline the events get added. That's exactly the same room state the res.state from the /messages response gets added to.

I guess I could have a further look into that code path ...

bwindels commented 6 years ago

Not going to investigate this further for now. If it's a big issue, we'll get more information on how to reproduce it once we go to a wider audience.

z411 commented 1 year ago

This also happens in Cinny for me, which uses matrix-js-sdk, so the underlying misbehavior must be there. In my experience it also only happens if I'm in a Dendrite homeserver so far. I can reproduce it consistently after going back in history enough (around 2-3 pages). Synapse seems to work okay.

image

Nheko, which doesn't use matrix-js-sdk, doesn't have this problem even on Dendrite homeservers. So my guess is matrix-js-sdk+dendrite.