Repository navigation
fix(concord-cli): --invites finds v2 Direct Invites (kind 3313) - #95
Open
TheSeydiCharyyev wants to merge 1 commit into
Open
TheSeydiCharyyev wants to merge 1 commit into
TheSeydiCharyyev wants to merge 1 commit into
Conversation
The probe only treated a v1 bundle (3304) as an invite. A v2 Direct Invite was counted in the kind tally and then dropped, so the verdict said NONE and blamed the relays. Each unwrapped rumor now goes through the bundle parser the app uses for its kind: parse_invite_rumor for 3304, from_bundle_json for 3313. A bundle that fails is listed with the reason instead of dropped. Closes VectorPrivacy#76
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.
concord --invitesnow finds v2 Direct Invites (kind 3313). Before, it counted them in the kind tally and then printed NONE. Closes #76.Change (only
crates/concord-cli/src/main.rs)invite_of(kind, content): it parses an unwrapped rumor with the bundle parser the app uses for that kind.parse_invite_rumorfor 3304 (v1),CommunityInvite::from_bundle_jsonfor 3313 (v2), the same asevent_handler.rsdoes for incoming invites.Tests
concord-clihad no tests. Four new ones inmain.rs:build_direct_inviteand unwrapped withUnwrappedGift::from_gift_wrap(the probe's own unwrap) is found.community_idis refused, and the reason names the owner.build_invite_rumoris still found.Without the 3313 branch, the two v2 tests fail.
Verified at
781cadd0afb0+ this commit, on Windows:cd crates && cargo test -p concord-cli: 4 passed, 0 failed.Not covered
concord-cli, so the run above is the only check.concord --invitesagainst a real inbox. To check it: run it on an account that got a v2 invite. The invite should now show under "community invites on network" withv2.Base branch
widescreen, where current work lands.