Correctly populate the dispatch for joining a room via servers

Fixes https://github.com/vector-im/riot-web/issues/9817
pull/21833/head
Travis Ralston 2019-06-28 16:26:28 -06:00
parent 35c0c3142f
commit e65cc3b189
1 changed files with 7 additions and 2 deletions

View File

@ -380,8 +380,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();
@ -422,10 +423,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);