From e65cc3b1890ca311e31c42dfbd315ed17e370cc0 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 28 Jun 2019 16:26:28 -0600 Subject: [PATCH] Correctly populate the dispatch for joining a room via servers Fixes https://github.com/vector-im/riot-web/issues/9817 --- src/SlashCommands.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/SlashCommands.js b/src/SlashCommands.js index f25bc9af07..3eab42e4d4 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -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);