diff options
author | Kegsay <kegan@matrix.org> | 2020-06-12 14:55:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 14:55:57 +0100 |
commit | ecd7accbad724f26248498a9035a1fbc69e2f08d (patch) | |
tree | de2c795b209c4527bc907570dfd1308cfa19be6f /clientapi/routing/createroom.go | |
parent | 4675e1ddb6a48fe1425032dc4f3cef56cbde7243 (diff) |
Rehuffle where things are in the internal package (#1122)
renamed: internal/eventcontent.go -> internal/eventutil/eventcontent.go
renamed: internal/events.go -> internal/eventutil/events.go
renamed: internal/types.go -> internal/eventutil/types.go
renamed: internal/http/http.go -> internal/httputil/http.go
renamed: internal/httpapi.go -> internal/httputil/httpapi.go
renamed: internal/httpapi_test.go -> internal/httputil/httpapi_test.go
renamed: internal/httpapis/paths.go -> internal/httputil/paths.go
renamed: internal/routing.go -> internal/httputil/routing.go
renamed: internal/basecomponent/base.go -> internal/setup/base.go
renamed: internal/basecomponent/flags.go -> internal/setup/flags.go
renamed: internal/partition_offset_table.go -> internal/sqlutil/partition_offset_table.go
renamed: internal/postgres.go -> internal/sqlutil/postgres.go
renamed: internal/postgres_wasm.go -> internal/sqlutil/postgres_wasm.go
renamed: internal/sql.go -> internal/sqlutil/sql.go
Diffstat (limited to 'clientapi/routing/createroom.go')
-rw-r--r-- | clientapi/routing/createroom.go | 16 |
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 |