Skip to content

libgm: ignore is_old=true GaiaLoggedOut events from queue replay#53

Open
shafqatjamil wants to merge 1 commit intomautrix:mainfrom
shafqatjamil:fix-stale-gaia-logout
Open

libgm: ignore is_old=true GaiaLoggedOut events from queue replay#53
shafqatjamil wants to merge 1 commit intomautrix:mainfrom
shafqatjamil:fix-stale-gaia-logout

Conversation

@shafqatjamil
Copy link
Copy Markdown

libgm: ignore is_old=true GaiaLoggedOut events from queue replay

The hackyLoggedOutBytes short-circuit in handleUpdatesEvent fired GaiaLoggedOut unconditionally, even for replayed queue events marked is_old=true. After a failed pair attempt, Google's per-account message queue retains orphan events including logout tombstones. On the next successful pair, those stale events are replayed to the new session and the bridge would self-unpair within ~1 second of "Successfully logged in." This aligns the logout path with the other branches in the same switch that already respect msg.IsOld.

Fixes #52

Checklist

libgm: ignore is_old=true GaiaLoggedOut events from queue replay

The hackyLoggedOutBytes short-circuit in handleUpdatesEvent fired
GaiaLoggedOut unconditionally, even for replayed queue events marked
is_old=true. After a failed pair attempt, Google's per-account message
queue retains orphan events including logout tombstones. On the next
successful pair, those stale events are replayed to the new session
and the bridge would self-unpair within ~1 second of "Successfully
logged in." This aligns the logout path with the other branches in
the same switch that already respect msg.IsOld.

Fixes mautrix#52
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.

BAD_CREDENTIALS

1 participant