Send all room versions when joining, not just stable ones

This commit is contained in:
Neil Alexander 2020-03-20 17:25:48 +00:00
parent 7b7f48c589
commit 63cbc614ff

View file

@ -307,11 +307,9 @@ func (r joinRoomReq) joinRoomUsingServer(roomID string, server gomatrixserverlib
return nil, err return nil, err
} }
var supportedVersions []gomatrixserverlib.RoomVersion var supportedVersions []gomatrixserverlib.RoomVersion
for version, descriptor := range response.AvailableRoomVersions { for version := range response.AvailableRoomVersions {
if descriptor == "stable" {
supportedVersions = append(supportedVersions, version) supportedVersions = append(supportedVersions, version)
} }
}
respMakeJoin, err := r.federation.MakeJoin(r.req.Context(), server, roomID, r.userID, supportedVersions) respMakeJoin, err := r.federation.MakeJoin(r.req.Context(), server, roomID, r.userID, supportedVersions)
if err != nil { if err != nil {
// TODO: Check if the user was not allowed to join the room. // TODO: Check if the user was not allowed to join the room.