mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 21:12:45 +00:00
Move CreateRoom logic to Roomserver (#3093)
Move create room logic over to roomserver.
This commit is contained in:
parent
61341aca50
commit
cbdc601f1b
24 changed files with 684 additions and 550 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/Masterminds/semver/v3"
|
||||
"github.com/matrix-org/gomatrix"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/matrix-org/gomatrixserverlib/spec"
|
||||
)
|
||||
|
||||
const userPassword = "this_is_a_long_password"
|
||||
|
@ -56,7 +57,7 @@ func runTests(baseURL string, v *semver.Version) error {
|
|||
|
||||
// create DM room, join it and exchange messages
|
||||
createRoomResp, err := users[0].client.CreateRoom(&gomatrix.ReqCreateRoom{
|
||||
Preset: "trusted_private_chat",
|
||||
Preset: spec.PresetTrustedPrivateChat,
|
||||
Invite: []string{users[1].userID},
|
||||
IsDirect: true,
|
||||
})
|
||||
|
@ -98,7 +99,7 @@ func runTests(baseURL string, v *semver.Version) error {
|
|||
publicRoomID := ""
|
||||
createRoomResp, err = users[0].client.CreateRoom(&gomatrix.ReqCreateRoom{
|
||||
RoomAliasName: "global",
|
||||
Preset: "public_chat",
|
||||
Preset: spec.PresetPublicChat,
|
||||
})
|
||||
if err != nil { // this is okay and expected if the room already exists and the aliases clash
|
||||
// try to join it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue