From 3a111c262ec1fd1153052fb6e7802e0312b979c4 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Tue, 20 Oct 2026 21:47:29 +0100 Subject: [PATCH] PLAT-39412 connector: keep room state while the chat type is missing Reddit can sync a new chat's members before its chat type, and the skipped batch's projection was dropped, so the room was later built without the user's own join and bridgev2 kicked them. Cache the untyped projection so the batch that sets the type merges onto it. Co-Authored-By: Claude Opus 5.5 --- pkg/connector/roomstate.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/connector/roomstate.go b/pkg/connector/roomstate.go index 9a03d5a..c9735e3 100644 --- a/pkg/connector/roomstate.go +++ b/pkg/connector/roomstate.go @@ -145,6 +145,8 @@ func (r *RedditClient) roomState(ctx context.Context, roomID id.RoomID, joined * return nil, networkid.PortalKey{}, unbridgeable(err) } if next.Type == "" { + // Reddit can send a new chat's members before its type. + r.rooms[roomID] = next return nil, networkid.PortalKey{}, unbridgeable(errMissingChatType) } key := r.makePortalKey(roomID, next.Type == "direct")