Compare commits

..

1 commit

Author SHA1 Message Date
b6c3e37478 Fix /api/link-space joinRoom() for remote spaces 2025-08-23 00:01:30 +09:00

View file

@ -17,12 +17,8 @@ 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) {
domainStartIndex = user.indexOf(":"); /* c8 ignore next */
if (domainStartIndex >= 1) { return user.partition(":")[2]
return user.slice(domainStartIndex + 1)
}
return ""
} }