Skip to content

bridgev2: invalidate inPortalCache on Matrix leave#472

Closed
KaiStarkk wants to merge 1 commit intomautrix:mainfrom
KaiStarkk:fix/invalidate-portal-cache-on-leave
Closed

bridgev2: invalidate inPortalCache on Matrix leave#472
KaiStarkk wants to merge 1 commit intomautrix:mainfrom
KaiStarkk:fix/invalidate-portal-cache-on-leave

Conversation

@KaiStarkk
Copy link
Copy Markdown

Fixes #471.

When bridge_matrix_leave is false, handleMatrixMembership drops the leave event without invalidating inPortalCache. This causes MarkInPortal to short-circuit on subsequent messages, skipping EnsureJoined, so the user is never re-invited.

One-line fix: call sender.inPortalCache.Remove(portal.PortalKey) before the early return.

…_leave is false

Without this, MarkInPortal short-circuits on the cache hit and never
calls EnsureJoined, so the user is never re-invited to the room.
@tulir tulir closed this in 31e9b3c Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

inPortalCache not invalidated on Matrix leave when bridge_matrix_leave is false

1 participant