opentower / populus-viewer

A Social Annotation Tool Powered by Matrix
https://opentower.github.io/populus-viewer
GNU Affero General Public License v3.0
120 stars 7 forks source link

Profile pictures seem outdated #113

Closed DanilaFe closed 2 years ago

DanilaFe commented 2 years ago

First of all, thanks for this excellent project!

I've found a curious issue: I just logged in to my account on my own homeserver, and found that the profile picture is one I used to have, but don't have anymore. Please let me know what I can do to help debug this.

gleachkr commented 2 years ago

Curious indeed... In the welcome view, your avatar is provided by an initial call to getUser on the client, here, and should update on avatar changed events.

Maybe the user objects from matrix-js-sdk don't update in the background in the way I thought?

DanilaFe commented 2 years ago

It works after a refresh; I wonder if that's a JS SDK bug, or if perhaps populus isn't listening to profile picture update events that the SDK sends?

gleachkr commented 2 years ago

It should be... There's a listener here, but maybe it's not working, or maybe there's a timing (ugh) issue...

~Updating my profile picture works properly. So maybe it's something like an issue with the way that avatarUrls are loaded into the User object by the SDK on an initial sync?~

OK that's not really evidence one way or the other - profile updates change the avatar locally, without relying on the avatar-changed event. They do fire the avatarChanged event handler though.