Repository navigation
0.36.0 - 2026-09-22
A host can now decide, per room, what happens when the local user stops
belonging to it — kept read-only with history (the only behaviour before
this release) or purged outright, with no row left behind.
Added
ChatUiAdapter.deletedRoomPolicy(DeletedRoomPolicyResolver?,
defaultnull) — aDeletedRoomPolicy Function(RoomListItem room)hook
consulted on every path that strips the user of a room: aroom_deleted
frame over WebSocket/SSE, the equivalent event the polling transport
synthesizes when a room drops out of the listing, auser_leftframe
naming the local user as the target of a kick,adapter.rooms.leave, and
the cached kicked marker replayed on a cold start. Leaving it unset (or a
resolver throwing) keeps every room onDeletedRoomPolicy.keepReadOnly,
which is what the SDK has always done, so the hook is fully
backwards-compatible.DeletedRoomPolicyenum:keepReadOnly— the row stays in the chat list with its full history,
flips toisParticipating == false(composer replaced by the "no
longer a participant" banner), and survives cold starts via the cached
kicked marker until the user removes it by hand through
ChatRoomOption.deleteKickedChat.purge— the room disappears entirely: the row leaves the chat list,
its open chat controller is disposed, and every cached trace (room,
detail, messages, unread snapshot, kicked marker) is deleted. The
purged id joins the never-evictable per-user deleted set, so a
room-list response already in flight cannot re-insert the row and
re-adding the user to the same room id will not bring it back. A user
sitting inside a purged room is taken out of it exactly as any other
membership revocation:onRoomRemovedfires andNomaChatViewpops
itself.
final chat = await NomaChat.create(
// ...
deletedRoomPolicy: (room) => room.custom?['support'] == true
? DeletedRoomPolicy.purge
: DeletedRoomPolicy.keepReadOnly,
);See doc/DEVELOPER_GUIDE.md § deletedRoomPolicy for the full reference.