bug: Leaving rooms is impossible when forget_forced_upon_leave=true #2321

Open
opened 2026-10-05 00:16:05 +00:00 by nex · 1 comment
Owner

What is the bug?

When forget_forced_upon_leave is set to true in the config, continuwuity immediately forgets rooms that the client just left, before it has a chance to sync them. The result is that left rooms end up being stuck in clients until an initial sync is performed.

It looks like this can also happen if a room is banned via !admin rooms moderation ban-room

Steps to reproduce

  1. Join a room
  2. Set forget_forced_upon_leave to true
  3. Restart continuwuity
  4. Leave a room
  5. You are now stuck in that room, no matter how many times you leave it, until you clear cache & reload.

Server name and version

nexy7574.co.uk v26.9.1 1e34bd2ed9

Additional context

if self.services.globals.user_is_local(user_id)
&& (self.services.config.forget_forced_upon_leave
|| self.services.metadata.is_banned(room_id).await
|| self.services.metadata.is_disabled(room_id).await)
{
self.forget(room_id, user_id);
}

### What is the bug? When `forget_forced_upon_leave` is set to `true` in the config, continuwuity immediately forgets rooms that the client just left, before it has a chance to sync them. The result is that left rooms end up being stuck in clients until an initial sync is performed. It looks like this can also happen if a room is banned via `!admin rooms moderation ban-room` ### Steps to reproduce 1. Join a room 2. Set `forget_forced_upon_leave` to `true` 3. Restart continuwuity 4. Leave a room 5. You are now stuck in that room, no matter how many times you leave it, until you clear cache & reload. ### Server name and version nexy7574.co.uk v26.9.1 1e34bd2ed97ea84a2f74101dd944c0156206278b ### Additional context https://forgejo.ellis.link/continuwuation/continuwuity/src/commit/62822febfebeec41e905237b14bbeb586f280283/src/service/rooms/state_cache/update.rs#L261-L267
Author
Owner

Going to drop the priority for this issue - there doesn't seem to be an easy way to solve this without either removing the forgetting function altogether, or faking the "forget" functionality (like adding a forget marker, similar to Synapse, which kinda defeats the point)

Going to drop the priority for this issue - there doesn't seem to be an easy way to solve this without either removing the forgetting function altogether, or faking the "forget" functionality (like adding a forget marker, similar to [Synapse](https://github.com/element-hq/synapse/blob/7773f055965f6a6558bbd74e768ddd3e40d871aa/synapse/storage/databases/main/roommember.py#L1566-L1588), which kinda defeats the point)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity#2321
No description provided.