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

remove checks on m.room.aliases #801

Merged
merged 2 commits into from
Feb 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
42 changes: 23 additions & 19 deletions tests/30rooms/60version_upgrade.pl
Original file line number Diff line number Diff line change
Expand Up @@ -697,19 +697,21 @@ sub upgrade_room_synced {
$creator, $room_id,
new_version => $TEST_NEW_VERSION,
expected_event_counts => {
'm.room.aliases' => 1, 'm.room.canonical_alias' => 1,
'm.room.aliases' => 0, 'm.room.canonical_alias' => 1,
},
);
})->then( sub {
( $new_room_id ) = @_;

matrix_get_room_state(
$creator, $room_id,
type=>'m.room.aliases', state_key=>$server_name,
);
})->then( sub {
my ( $old_aliases ) = @_;
assert_deeply_eq( $old_aliases, {aliases => []}, "aliases on old room" );
# m.room.aliases are filtered out until a better solution to mitigating abuse is is specced.
#
# matrix_get_room_state(
# $creator, $room_id,
# type=>'m.room.aliases', state_key=>$server_name,
# );
# })->then( sub {
# my ( $old_aliases ) = @_;
# assert_deeply_eq( $old_aliases, {aliases => []}, "aliases on old room" );

matrix_get_room_state( $creator, $room_id, type=>'m.room.canonical_alias' );
})->then( sub {
Expand All @@ -718,17 +720,19 @@ sub upgrade_room_synced {
$old_canonical_alias, {}, "canonical_alias on old room",
);

matrix_get_room_state(
$creator, $new_room_id,
type=>'m.room.aliases', state_key=>$server_name,
);
})->then( sub {
my ( $new_aliases ) = @_;
assert_deeply_eq(
[ sort( @{ $new_aliases->{aliases} } ) ],
[ sort( $room_alias_1, $room_alias_2 ) ],
"aliases on new room",
);
# m.room.aliases are filtered out until a better solution to mitigating abuse is is specced.
#
# matrix_get_room_state(
# $creator, $new_room_id,
# type=>'m.room.aliases', state_key=>$server_name,
# );
# })->then( sub {
# my ( $new_aliases ) = @_;
# assert_deeply_eq(
# [ sort( @{ $new_aliases->{aliases} } ) ],
# [ sort( $room_alias_1, $room_alias_2 ) ],
# "aliases on new room",
# );

matrix_get_room_state(
$creator, $new_room_id, type=>'m.room.canonical_alias',
Expand Down