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