Skip to content

Commit

Permalink
Allow HSes to omit device display names (#1307)
Browse files Browse the repository at this point in the history
* Allow HSes to omit device display names

Hopefully gets matrix-org/synapse#10015 over the line.

* Fix perl syntax?!?!
  • Loading branch information
David Robertson authored Oct 18, 2022
1 parent da1c9e2 commit c06e64b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/41end-to-end-keys/06-device-lists.pl
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,12 @@ sub sync_until_user_in_device_list_id
my $alice_device_keys = $alice_keys->{ $user2->device_id };

# TODO: Check that the content matches what we uploaded.

assert_eq( $alice_device_keys->{"unsigned"}->{"device_display_name"},
"test display name" );
# Device display names aren't mandated in the POST /user/keys/query response,
# and they're considered optional in the GET /user/devices/{userId} response.
# So accept either a match or a lack of key.
my $device_display_name = $alice_device_keys->{"unsigned"}->{"device_display_name"};
(!defined $device_display_name) or ($device_display_name == "test display name") or
croak "Unexpected device_display_name: $device_display_name";

Future->done(1)
});
Expand Down

0 comments on commit c06e64b

Please sign in to comment.