Skip to content

Commit

Permalink
remove checks on m.room.aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
ara4n committed Feb 9, 2020
1 parent 725c385 commit 286b961
Showing 1 changed file with 23 additions and 19 deletions.
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 MSC2261 lands
#
# 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 MSC2261 lands
#
# 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

0 comments on commit 286b961

Please sign in to comment.