Compare commits

..

1 commit

Author SHA1 Message Date
6734c15ca2 Fix /api/link-space joinRoom() for remote spaces 2025-08-23 00:10:35 +09:00

View file

@ -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 ""
} }