Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly return the full auth chain in test #911

Merged
merged 1 commit into from
Jul 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/50federation/36state.pl
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,16 @@ sub get_state_ids_from_server {
$state{$k} = $event;
}

my @auth_chain = $inbound_server->{datastore}->get_auth_chain_events(
map { $_->{event_id} } values( %state )
);

my $resp = {
pdu_ids => [
map { $_->{event_id} } values( %state ),
],
auth_chain_ids => [
# XXX we're supposed to return the whole auth chain here,
# not just y's auth_events. It doesn't matter too much
# here though.
map { $_->[0] } @{ $missing_event_y->{auth_events} },
map { $_->{event_id} } @auth_chain,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ftr, this won't work in room v3 or later, though it looks like the whole test needs an update for that anyway. The right way to write this is $room->id_for_event( $_ ).

],
};

Expand Down