mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-18 04:13:10 -06:00
Use default room version correctly
This commit is contained in:
parent
3994e4c588
commit
49d3000371
|
|
@ -18,11 +18,13 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
appserviceAPI "github.com/matrix-org/dendrite/appservice/api"
|
appserviceAPI "github.com/matrix-org/dendrite/appservice/api"
|
||||||
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
|
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
|
||||||
|
roomserverVersion "github.com/matrix-org/dendrite/roomserver/version"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
||||||
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
|
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
|
||||||
|
|
@ -180,7 +182,7 @@ func createRoom(
|
||||||
}
|
}
|
||||||
|
|
||||||
r.CreationContent["creator"] = userID
|
r.CreationContent["creator"] = userID
|
||||||
r.CreationContent["room_version"] = "1" // TODO: We set this to 1 before we support Room versioning
|
r.CreationContent["room_version"] = strconv.Itoa(roomserverVersion.GetDefaultRoomVersion())
|
||||||
|
|
||||||
// TODO: visibility/presets/raw initial state
|
// TODO: visibility/presets/raw initial state
|
||||||
// TODO: Create room alias association
|
// TODO: Create room alias association
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue