Skip to content

Commit

Permalink
Use "username" instead of "user" when registering AS users (#1017)
Browse files Browse the repository at this point in the history
Apparently "user" is old non-spec-compliant behaviour and we should be using "username" now:

https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-register
  • Loading branch information
neilalexander authored Mar 4, 2021
1 parent 7d29795 commit ab7b8f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/60app-services/01as-create.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
uri => "/r0/register",

content => {
user => "astest-01create-0-$TEST_RUN_ID",
username => "astest-01create-0-$TEST_RUN_ID",
},
)->then( sub {
my ( $body ) = @_;
Expand All @@ -37,7 +37,7 @@
uri => "/r0/register",

content => {
user => "_astest-01create-0-$TEST_RUN_ID",
username => "_astest-01create-0-$TEST_RUN_ID",
},
)->then( sub {
my ( $body ) = @_;
Expand All @@ -62,7 +62,7 @@
uri => "/r0/register",

content => {
user => "astest-01create-1-$TEST_RUN_ID",
username => "astest-01create-1-$TEST_RUN_ID",
inhibit_login => 1,
},
)->then( sub {
Expand Down Expand Up @@ -90,7 +90,7 @@
uri => "/r0/register",

content => {
user => "a-different-user",
username => "a-different-user",
}
)->main::expect_http_4xx;
};
Expand Down Expand Up @@ -174,7 +174,7 @@ sub matrix_register_as_ghost
uri => "/r0/register",

content => {
user => $user_id,
username => $user_id,
}
)->then( sub {
my ( $body ) = @_;
Expand Down
2 changes: 1 addition & 1 deletion tests/60app-services/02ghost.pl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
uri => "/r0/register",

content => {
user => $unregistered_as_user_localpart,
username => $unregistered_as_user_localpart,
},
);
};
Expand Down

0 comments on commit ab7b8f0

Please sign in to comment.