element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.38k stars 726 forks source link

API (v2) deleted rooms cannot be left #8675

Open alamos-gmbh opened 12 months ago

alamos-gmbh commented 12 months ago

Steps to reproduce

  1. Delete a room via admin api (v2) (purge: true; force_purge: false; block: true) https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#version-2-new-version
  2. Try to leave room inside elements app (please see attached images)
  3. Receive message "Error Not a known room" (please see attached images)
  4. Find the room in a orphaned state, remaining in the list forever

Outcome

Expected

Room should be gone after Admin Api deletion

Actual

Room remains in the list and cannot be removed manually. It stays there forever

Your phone model

Pixel 6a

Operating system version

Android 14

Application version and app store

1.6.6 from Google PlayStore

Homeserver

Synapse 1.94.0

Will you send logs?

Yes (rage shake bug report sent)

Are you willing to provide a PR?

No (Depends)

Repo steps graphical:

Screenshot_20231109-092330 Screenshot_20231109-092352 Screenshot_20231109-092344

alamos-gmbh commented 12 months ago

Changing the payload to (purge:false)

{
    "block": true,
    "purge": false
}

Seems to get handled correctly (yet invitations remain), but it should also work together with purging all room data from the database. With purge false the room vanishes even while being in the room, which is fine.

Suggestion: Treat "not a known room" after a removal attempt (manually) as a trigger to remove the room from the local database.