-
Notifications
You must be signed in to change notification settings - Fork 60
Test that can reject federated invites #1239
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -241,7 +241,7 @@ sub configure_logger | |
|
|
||
| loggers => { | ||
| synapse => { | ||
| level => "INFO" | ||
| level => "DEBUG" | ||
| } | ||
| }, | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -807,3 +807,51 @@ sub check_filler_event { | |
| Future->done(1); | ||
| }); | ||
| }; | ||
|
|
||
|
|
||
| test "Rejecting invite over federation doesn't break incremental /sync", | ||
| requires => [ remote_user_fixture(), | ||
| do { | ||
| my $creator = local_user_fixture(); | ||
| $creator, inviteonly_room_fixture( creator => $creator ); | ||
| } | ||
| ], | ||
|
|
||
| check => sub { | ||
| my ( $invitee, $creator, $room_id ) = @_; | ||
|
|
||
| my ( $filter_id ); | ||
|
|
||
| matrix_create_filter( $invitee, { | ||
| room => { | ||
| state => { | ||
| lazy_load_members => JSON::true, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this really require lazy loading? I'm not really sure I'm following that bit.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. During lazy loading we pull out state a second time to get the membership event of the sender of the outlier event, so we stick lazy loading on to hit more of the /sync code paths
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! 👍 |
||
| include_redundant_members => JSON::true, | ||
| }, | ||
| timeline => { | ||
| limit => 10 | ||
| }, | ||
| } | ||
| })->then( sub { | ||
| ( $filter_id ) = @_; | ||
|
|
||
| matrix_sync( $invitee, filter => $filter_id ) | ||
| })->then( sub { | ||
| matrix_invite_user_to_room_synced( $creator, $invitee, $room_id ) | ||
| })->then( sub { | ||
| matrix_leave_room_synced( $invitee, $room_id ) | ||
| })->then( sub { | ||
| matrix_sync_again( $invitee, filter => $filter_id ) | ||
| })->then( sub { | ||
| my ( $body ) = @_; | ||
|
|
||
| # Check that invitee no longer sees the invite | ||
|
|
||
| if( exists $body->{rooms} and exists $body->{rooms}{invite} ) { | ||
| assert_json_object( $body->{rooms}{invite} ); | ||
| keys %{ $body->{rooms}{invite} } and die "Expected empty dictionary"; | ||
| } | ||
|
|
||
| Future->done( 1 ); | ||
| }); | ||
| }; | ||
Uh oh!
There was an error while loading. Please reload this page.