Compare commits
1 commit
b6c3e37478
...
6734c15ca2
Author | SHA1 | Date | |
---|---|---|---|
6734c15ca2 |
1 changed files with 6 additions and 2 deletions
|
@ -17,8 +17,12 @@ const {reg} = require("../../matrix/read-registration")
|
||||||
* @returns {string} the HS of the user, or "" if the user ID is malformed
|
* @returns {string} the HS of the user, or "" if the user ID is malformed
|
||||||
*/
|
*/
|
||||||
function getHSOfUser(user) {
|
function getHSOfUser(user) {
|
||||||
/* c8 ignore next */
|
domainStartIndex = user.indexOf(":");
|
||||||
return user.partition(":")[2]
|
if (domainStartIndex >= 1) {
|
||||||
|
return user.slice(domainStartIndex + 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue