Conversation
…ership The export identity modal failed for any room where self_authorized_member was None. This affected room owners (capture_self_membership_data skips owners) and non-owners whose membership hadn't been captured yet. Fix: The export modal now resolves the AuthorizedMember from three sources: 1. Cached self_authorized_member (existing behavior) 2. For owners: creates a self-signed AuthorizedMember on the fly 3. For non-owners: looks up the member from current room state Also populates self_authorized_member in example data for testability. Closes #187 [AI-assisted - Claude] Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove `is_owner` temp variable, inline the comparison - Move `params` construction into the only branch that uses it - Tighten comments in test and example data Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix same export bug in riverctl CLI (was also hard-requiring self_authorized_member, failing for owners and uncaptured members) - Change unwrap_or_default() to ok() for invite chain resolution in UI export — a broken chain now falls through to the error message instead of producing an invalid export token Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Problem
Exporting an identity from any room other than the first showed "Cannot export: membership data not available" even when the user had sent messages. This happened because:
capture_self_membership_data()skips owners (returns early whenverifying_key == owner_vk), soself_authorized_memberwas alwaysNonecapture_self_membership_dataran, or if room data predated the field, the export silently failedApproach
Instead of requiring
self_authorized_memberto be pre-cached, the export modal now resolves theAuthorizedMemberfrom three sources in priority order:self_authorized_member— existing fast path, no changeAuthorizedMemberon the fly (owner signs themselves asinvited_by: owner_id)room_state.membersand builds the invite chainAlso looks up
member_infofrom current state as fallback whenself_member_infoisNone.Testing
test_owner_self_signed_roundtripto verify owner identity export/import works correctly (self-signed AuthorizedMember roundtrips, signature validates)self_authorized_memberfor "Member" rooms so the export feature is testable in example modeCloses #187
[AI-assisted - Claude]