element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.01k stars 136 forks source link

DM room that previously contained a 3rd user (bot) has no avatar after cache clear #3581

Open frebib opened 2 days ago

frebib commented 2 days ago

Steps to reproduce

  1. Create a DM room with another user and have them join
  2. Add a 3rd user (like a bot), have them join, then kick them/have them leave
  3. Clear the app cache and observe that the room no longer has an avatar (also the room name takes a bit of time to populate whereas it's normally instant for DM rooms)

Outcome

What did you expect?

The avatar/room name to appear like any other normal DM room

What happened instead?

The avatar never appeared

Your phone model

Pixel thingy

Operating system version

14? Honestly I lose track

Application version and app store

https://github.com/frebib/element-x-android/commits/528cbe333c32c11f8f169f6ac39070ff32032b7d/

Homeserver

Synapse 1.116.0

Will you send logs?

No

Are you willing to provide a PR?

No

frebib commented 2 days ago

A little poke with the interactive debugger tells me that heroes is an empty list, and the avatar_url is also None. It makes sense that avatar_url is None but heroes should not be in this case.

frebib commented 2 days ago

Seems like the rust SDK returns roomInfo().heroes as as empty list here https://github.com/element-hq/element-x-android/blob/29356b96c157dd80194a5c49b7a1b9493f5c7ab9/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustMatrixRoom.kt#L106