aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/createroom.go
diff options
context:
space:
mode:
Diffstat (limited to 'clientapi/routing/createroom.go')
-rw-r--r--clientapi/routing/createroom.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/clientapi/routing/createroom.go b/clientapi/routing/createroom.go
index 89f49d35..fd91a106 100644
--- a/clientapi/routing/createroom.go
+++ b/clientapi/routing/createroom.go
@@ -30,8 +30,8 @@ import (
"github.com/matrix-org/dendrite/clientapi/httputil"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/clientapi/threepid"
- "github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/internal/config"
+ "github.com/matrix-org/dendrite/internal/eventutil"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util"
log "github.com/sirupsen/logrus"
@@ -98,7 +98,7 @@ func (r createRoomRequest) Validate() *util.JSONResponse {
// Validate creation_content fields defined in the spec by marshalling the
// creation_content map into bytes and then unmarshalling the bytes into
- // internal.CreateContent.
+ // eventutil.CreateContent.
creationContentBytes, err := json.Marshal(r.CreationContent)
if err != nil {
@@ -279,25 +279,25 @@ func createRoom(
eventsToMake := []fledglingEvent{
{"m.room.create", "", r.CreationContent},
{"m.room.member", userID, membershipContent},
- {"m.room.power_levels", "", internal.InitialPowerLevelsContent(userID)},
+ {"m.room.power_levels", "", eventutil.InitialPowerLevelsContent(userID)},
{"m.room.join_rules", "", gomatrixserverlib.JoinRuleContent{JoinRule: joinRules}},
- {"m.room.history_visibility", "", internal.HistoryVisibilityContent{HistoryVisibility: historyVisibility}},
+ {"m.room.history_visibility", "", eventutil.HistoryVisibilityContent{HistoryVisibility: historyVisibility}},
}
if roomAlias != "" {
// TODO: bit of a chicken and egg problem here as the alias doesn't exist and cannot until we have made the room.
// This means we might fail creating the alias but say the canonical alias is something that doesn't exist.
// m.room.aliases is handled when we call roomserver.SetRoomAlias
- eventsToMake = append(eventsToMake, fledglingEvent{"m.room.canonical_alias", "", internal.CanonicalAlias{Alias: roomAlias}})
+ eventsToMake = append(eventsToMake, fledglingEvent{"m.room.canonical_alias", "", eventutil.CanonicalAlias{Alias: roomAlias}})
}
if r.GuestCanJoin {
- eventsToMake = append(eventsToMake, fledglingEvent{"m.room.guest_access", "", internal.GuestAccessContent{GuestAccess: "can_join"}})
+ eventsToMake = append(eventsToMake, fledglingEvent{"m.room.guest_access", "", eventutil.GuestAccessContent{GuestAccess: "can_join"}})
}
eventsToMake = append(eventsToMake, r.InitialState...)
if r.Name != "" {
- eventsToMake = append(eventsToMake, fledglingEvent{"m.room.name", "", internal.NameContent{Name: r.Name}})
+ eventsToMake = append(eventsToMake, fledglingEvent{"m.room.name", "", eventutil.NameContent{Name: r.Name}})
}
if r.Topic != "" {
- eventsToMake = append(eventsToMake, fledglingEvent{"m.room.topic", "", internal.TopicContent{Topic: r.Topic}})
+ eventsToMake = append(eventsToMake, fledglingEvent{"m.room.topic", "", eventutil.TopicContent{Topic: r.Topic}})
}
// TODO: invite events
// TODO: 3pid invite events