1
0
Fork 1

Fix partial room token matches in JS

remotes/1715175271555336803/main
gravel 2 years ago
parent 6d45d5ceca
commit 558202a4a9
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -93,7 +93,7 @@ export const dom = {
// Support matching shorter legacy IDs in links online // Support matching shorter legacy IDs in links online
const matches = matchIdPrefix ? '^=' : '='; const matches = matchIdPrefix ? '^=' : '=';
// Support matching room token, but only as a full match (plus symbol and hex code follows) // Support matching room token, but only as a full match (plus symbol and hex code follows)
const id = communityID.includes('+') ? `${communityID}+` : communityID; const id = !matchIdPrefix || communityID.includes('+') ? communityID : `${communityID}+`;
return document.querySelector(`.room-row[${identifier}${matches}"${communityID}"]`); return document.querySelector(`.room-row[${identifier}${matches}"${communityID}"]`);
}, },
/** /**