Skip to content

fix: handle error 99 (member count mismatch) - #240

Merged
highesttt merged 2 commits into
mainfrom
highest/plat-38749
Sep 9, 2026
Merged

fix: handle error 99 (member count mismatch)#240
highesttt merged 2 commits into
mainfrom
highest/plat-38749

Conversation

@highesttt

Copy link
Copy Markdown
Collaborator

No description provided.

@linear-code

linear-code Bot commented Sep 8, 2026

Copy link
Copy Markdown

PLAT-38749

@indent

indent Bot commented Sep 8, 2026

Copy link
Copy Markdown
PR Summary

Fixes LINE error 99 ("member count mismatch") during E2EE group key registration by registering against LINE's authoritative server snapshot instead of assembling the member list locally.

  • registerGroupKey now fetches getLastE2EEPublicKeys(chatMid) (which includes the caller), wraps the new group key for exactly those members, and registers; on a "member count mismatch" it refreshes the snapshot and retries once (bounded).
  • Adds IsE2EEGroupMemberMismatch to detect TalkException code 99 / reason "member count mismatch".
  • Changes GetLastE2EEPublicKeys to take a bare chatMid (single positional RPC arg) and parse data via json.RawMessage.
  • Removes the now-unneeded local member-resolution machinery (groupKeyMemberMIDs, resolveGroupMemberPublicKeys, getChatMemberMIDs, joinedGroupMemberMIDs, getGroupMemberMIDsViaMatrix) and their tests, plus the GetLastE2EEPublicKeysRequest struct.

Issues

All clear! No issues remaining. 🎉

2 issues already resolved
  • Group message send fails hard instead of falling back to plaintext when a member lacks a usable E2EE key. The rewritten registerGroupKey returns its validation errors ("incomplete E2EE group member public key", "no registration members returned", "members do not include caller") without the line.ErrNoUsableE2EEGroupKey wrapper, so lineGroupE2EEFetchFailureError/IsNoUsableE2EEGroupKey on the send path no longer classify them and return the error to the user. Wrap them with line.ErrNoUsableE2EEGroupKey to restore the plaintext fallback. (fixed by commit c28fd7d)
  • The comment above the groupMemberCache write in CreateGroup still says the list is cached "so auto-registration can fall back to it," but this PR removed those auto-registration fallbacks. The cache is now only consumed by name generation in sync.go; update the comment to avoid misleading future readers. (fixed by commit c28fd7d)

CI Checks

All CI checks passed on c28fd7d.

Comment thread pkg/connector/creategroup.go
@highesttt
highesttt merged commit 3f830ca into main Sep 9, 2026
9 checks passed
@highesttt
highesttt deleted the highest/plat-38749 branch September 9, 2026 17:55
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.

1 participant