Skip to content

Commit

Permalink
Merge pull request matrix-org#1 from EuroPython/check_for_tickets_err…
Browse files Browse the repository at this point in the history
…or_on_login

check first if a no-tickets error is raised on login page
  • Loading branch information
thepetk authored Jun 5, 2021
2 parents 78fb83f + 20e0a8a commit e4a0c77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/structures/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ export default class LoginComponent extends React.PureComponent<IProps, IState>

// Some error strings only apply for logging in
const usingEmail = username.indexOf("@") > 0;
if (error.httpStatus === 400 && usingEmail) {
if (error.errcode == 'no_tickets_found') {
errorText = "Login failed. Please purchase or assign a ticket to this email address first.";
} else if (error.httpStatus === 400 && usingEmail) {
errorText = _t('This homeserver does not support login using email address.');
} else if (error.errcode === 'M_RESOURCE_LIMIT_EXCEEDED') {
const errorTop = messageForResourceLimitError(
Expand Down

0 comments on commit e4a0c77

Please sign in to comment.