Repository navigation
fix(groups): a member who left can be added back by the admin - #33
Merged
Merged
Conversation
The member's client ignored every group state after leaving, so a member the admin re-added stayed out forever: all group messages to them stayed at one tick and the admin saw no error (QA report 2026-11-18, T1-GRP-003). The admin now records in which version a member was added (field "j" in the group state, schema 17 column gruppen.aufgenommen). A stale state from an admin who has not processed the leave yet still carries the old add version and keeps the member out, as before. A real re-add carries a version higher than the one the member left at and brings them back. Older apps ignore the field and keep the old behaviour. Leaving a group now asks for confirmation first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This was referenced Nov 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes the first high-severity finding of the Linux QA report from 16–18 Nov 2026 (T1-GRP-003, confirmed by all three testers).
Problem
After a member leaves a group and the admin adds them back, the member's client keeps believing it is out. Every later group state is dropped by
if (alt.verlassen) return;in_nimmGruppenStand. Messages to the member stay at one tick forever, the member receives nothing and the admin sees no error.That early return was deliberate (25.09.2026): an admin who has not yet processed the leave keeps announcing the member in later states (a rename, for example), and those stale states used to pull the member back in. But it also blocked every legitimate re-add.
Fix
j(address → version) in the announced state, only for members added after creation. A group without such members gets exactly the same state text as before.v) accepts a state again only if it lists them with an add version greater thanv. A stale state from an admin who has not seen the leave still carries the old add version, so the member stays out, as before.gruppen.aufgenommen(schema 17, repeatable like the earlier steps). Every member stores it, so a successor admin keeps announcing it.j: with an old admin or an old member nothing changes compared to today.Tests
test/net/gruppen_test.dart: real relay, three cores. Bob leaves, Anna adds him back, then Anna's message reaches Bob and gets two ticks, and Bob's reply reaches Carl. Onmainthis test fails ("bob kennt die Gruppe nicht"); with the fix it passes.test/net/protokoll_befunde_test.dart(M3): re-add is accepted, a stale state with the old add version (3or4for a member who left at4) keeps the member out, and a non-admin cannot re-add.test/core/protokoll_befunde_test.dart:Gruppe.lieswithj(round trip, unchanged text without it, malformed values make the state invalid).test/store/schema17_test.dart: migration keeps existing groups and gives them NULL, repeatable, read/write/clear.Run in CT 107 (Flutter 3.44.8, Linux):
flutter analyzeshows only the 29 existing hints; the five touched test files pass (63 tests).Not covered
🤖 Generated with Claude Code