mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-14 11:10:29 +03:00
Stop parsing servername from roomId (#2391)
This commit is contained in:
parent
fbd7e0a14b
commit
c30c142653
5 changed files with 9 additions and 16 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue