Skip to content

Commit

Permalink
send_join test: Omit create event from state (#1193)
Browse files Browse the repository at this point in the history
As of MSC3706, omitting the create event from `auth_chain` is valid (because it
should also be in `state`). But it definitely *should* be there in `state`.
  • Loading branch information
richvdh authored Feb 22, 2022
1 parent e9fb1e5 commit 0ce85d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/50federation/30room-join.pl
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,14 @@ sub assert_is_valid_pdu {
map { $_->[0] } @{ $event->{auth_events} }
);

# filter out the m.room.create event
@auth_chain = grep { $_->{type} ne 'm.room.create' } @auth_chain;
# filter out the m.room.create event from the state response
my @state_events = grep { $_->{type} ne 'm.room.create' } $room->current_state_events;

$req->respond_json(
# /v1/send_join has an extraneous [200, ...] wrapper (see MSC1802)
my $response = [ 200, {
auth_chain => \@auth_chain,
state => [ $room->current_state_events ],
state => \@state_events,
} ]
);

Expand Down

0 comments on commit 0ce85d3

Please sign in to comment.