Stop parsing servername from roomId (#2391)

This commit is contained in:
Ajay Bura
2025-07-15 18:03:45 +05:30
committed by GitHub
parent 6bec8aa2bb
commit e6f6e2117c
5 changed files with 9 additions and 16 deletions
+1 -4
View File
@@ -93,11 +93,8 @@ function convertToRoom(mx, roomId) {
* @param {string[]} via
*/
async function join(mx, roomIdOrAlias, isDM = false, via = undefined) {
const roomIdParts = roomIdOrAlias.split(':');
const viaServers = via || [roomIdParts[1]];
try {
const resultRoom = await mx.joinRoom(roomIdOrAlias, { viaServers });
const resultRoom = await mx.joinRoom(roomIdOrAlias, { viaServers: via });
if (isDM) {
const targetUserId = guessDMRoomTargetId(mx.getRoom(resultRoom.roomId), mx.getUserId());