Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3161 from matrix-org/travis/fix-via-join
Browse files Browse the repository at this point in the history
Correctly populate the dispatch for joining a room via servers
  • Loading branch information
turt2live authored Jul 1, 2019
2 parents 64f0a7c + e65cc3b commit 38bfe8b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/SlashCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,9 @@ export const CommandMap = {
room_id: roomId,
opts: {
// These are passed down to the js-sdk's /join call
server_name: viaServers,
viaServers: viaServers,
},
via_servers: viaServers, // for the rejoin button
auto_join: true,
});
return success();
Expand Down Expand Up @@ -444,10 +445,14 @@ export const CommandMap = {
}

if (viaServers) {
// For the join
dispatch["opts"] = {
// These are passed down to the js-sdk's /join call
server_name: viaServers,
viaServers: viaServers,
};

// For if the join fails (rejoin button)
dispatch['via_servers'] = viaServers;
}

dis.dispatch(dispatch);
Expand Down

0 comments on commit 38bfe8b

Please sign in to comment.