Skip to content

Commit a4addbd

Browse files
Only send server_name in blueprint joins when it's non-empty (#522)
1 parent e0a133d commit a4addbd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/instruction/runner.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,11 @@ func calculateRoomInstructionSets(r *Runner, hs b.Homeserver) [][]instruction {
482482
path = "/_matrix/client/v3/join/$roomId"
483483
method = "POST"
484484

485-
// Set server_name to the homeserver that created the room, as they're a pretty
486-
// good candidate to join the room through
487-
queryParams["server_name"] = fmt.Sprintf(".room_ref_%s_server_name", room.Ref)
485+
if room.Ref != "" {
486+
// Set server_name to the homeserver that created the room, as they're a pretty
487+
// good candidate to join the room through
488+
queryParams["server_name"] = fmt.Sprintf(".room_ref_%s_server_name", room.Ref)
489+
}
488490
case "leave":
489491
path = "/_matrix/client/v3/rooms/$roomId/leave"
490492
method = "POST"

0 commit comments

Comments
 (0)