Skip to content

Commit

Permalink
Fix 'Inbound federation correctly soft fails events' (#1371)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston authored Nov 16, 2023
1 parent bd882ce commit 4914c2f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/50federation/52soft-fail.pl
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,16 @@
event => $denied_event,
destination => $first_home_server,
);
})->then( sub {
# Wait until we receive the power levels
retry_until_success {
$inbound_server->datastore->get_event( $power_level_event_id );
Future->done( 1 )
}
})->then( sub {
# Now send a non-message (event D)
my $pl_event = $inbound_server->datastore->get_event( $power_level_event_id );
die "did not receive PL event" unless $pl_event;

my $event = $room->create_and_insert_event(
type => "m.room.other_message_type",

Expand Down Expand Up @@ -518,6 +524,12 @@
event => $event_sf2,
destination => $first_home_server,
);
})->then( sub {
# Wait until we receive the power levels
retry_until_success {
$inbound_server->datastore->get_event( $event_id_pl1 );
Future->done( 1 )
}
})->then( sub {
# send a regular message (event m2), which should be accepted
my $event_pl1 = $inbound_server->datastore->get_event( $event_id_pl1 );
Expand Down

0 comments on commit 4914c2f

Please sign in to comment.