diff --git a/src/app/organisms/invite-user/InviteUser.jsx b/src/app/organisms/invite-user/InviteUser.jsx
index 0a4a04d..cac9060 100644
--- a/src/app/organisms/invite-user/InviteUser.jsx
+++ b/src/app/organisms/invite-user/InviteUser.jsx
@@ -230,7 +230,7 @@ function InviteUser({
>
diff --git a/src/app/organisms/public-channels/PublicChannels.jsx b/src/app/organisms/public-channels/PublicChannels.jsx
index c69366e..b7388e5 100644
--- a/src/app/organisms/public-channels/PublicChannels.jsx
+++ b/src/app/organisms/public-channels/PublicChannels.jsx
@@ -177,10 +177,10 @@ function PublicChannels({ isOpen, searchTerm, onRequestClose }) {
onRequestClose();
}
- function joinChannel(roomId) {
- joiningChannels.add(roomId);
+ function joinChannel(roomIdOrAlias) {
+ joiningChannels.add(roomIdOrAlias);
updateJoiningChannels(new Set(Array.from(joiningChannels)));
- roomActions.join(roomId, false);
+ roomActions.join(roomIdOrAlias, false);
}
function renderChannelList(channels) {
@@ -199,7 +199,7 @@ function PublicChannels({ isOpen, searchTerm, onRequestClose }) {
options={(
<>
{isJoined && }
- {!isJoined && (joiningChannels.has(channel.room_id) ? : )}
+ {!isJoined && (joiningChannels.has(channel.room_id) ? : )}
>
)}
/>
diff --git a/src/client/action/room.js b/src/client/action/room.js
index ecf58a7..407a9e3 100644
--- a/src/client/action/room.js
+++ b/src/client/action/room.js
@@ -85,8 +85,9 @@ function guessDMRoomTargetId(room, myUserId) {
*/
async function join(roomIdOrAlias, isDM) {
const mx = initMatrix.matrixClient;
+ const roomIdParts = roomIdOrAlias.split(':');
try {
- const resultRoom = await mx.joinRoom(roomIdOrAlias);
+ const resultRoom = await mx.joinRoom(roomIdOrAlias, { viaServers: [roomIdParts[1]] });
if (isDM) {
const targetUserId = guessDMRoomTargetId(mx.getRoom(resultRoom.roomId), mx.getUserId());