mirror of
https://github.com/hyperspacedev/hyperspace
synced 2025-02-03 18:57:38 +01:00
Merge pull request #39 from hyperspacedev/login-logic
Fix well-known login caused by faulty check in federation status
This commit is contained in:
commit
b4c99af026
@ -137,10 +137,16 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
|
||||
}
|
||||
|
||||
getLoginUser(user: string) {
|
||||
if (this.state.federates || user.includes("@")) {
|
||||
let newUser = user;
|
||||
this.setState({ user: newUser })
|
||||
return "https://" + newUser.split("@")[1];
|
||||
if (user.includes("@")) {
|
||||
if (this.state.federates) {
|
||||
let newUser = user;
|
||||
this.setState({ user: newUser });
|
||||
return "https://" + newUser.split("@")[1];
|
||||
} else {
|
||||
let newUser = `${user}@${this.state.registerBase? this.state.registerBase: "mastodon.social"}`;
|
||||
this.setState({ user: newUser });
|
||||
return "https://" + (this.state.registerBase? this.state.registerBase: "mastodon.social");
|
||||
}
|
||||
} else {
|
||||
let newUser = `${user}@${this.state.registerBase? this.state.registerBase: "mastodon.social"}`;
|
||||
this.setState({ user: newUser });
|
||||
|
Loading…
x
Reference in New Issue
Block a user