Don't include server in DM links if not needed
This commit is contained in:
parent
e6eeb9ede8
commit
c04a0a2638
5 changed files with 28 additions and 5 deletions
|
|
@ -29,4 +29,12 @@ export default class User {
|
|||
}
|
||||
return user_id;
|
||||
}
|
||||
|
||||
// Get the domain out of the home_server, so if that one is e.g.
|
||||
// "https://yourdomain.com:8008" then we return "yourdomain.com"
|
||||
static serverDomain(home_server) {
|
||||
const parts = home_server.split("://");
|
||||
const serverAndPort = parts[parts.length - 1].split(/:|\//);
|
||||
return serverAndPort[0];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue