From da01d4b88c186bb1db5215d7b53d9935e618cdd7 Mon Sep 17 00:00:00 2001 From: Sam Wedgwood Date: Thu, 13 Jul 2023 15:00:39 +0100 Subject: [PATCH] Add constants used in space summaries - related PR: https://github.com/matrix-org/dendrite/pull/3134 --- spec/eventtypes.go | 4 ++++ spec/roomtypes.go | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 spec/roomtypes.go diff --git a/spec/eventtypes.go b/spec/eventtypes.go index a9d3217f..94108d8f 100644 --- a/spec/eventtypes.go +++ b/spec/eventtypes.go @@ -68,4 +68,8 @@ const ( MPresence = "m.presence" // MRoomMembership https://github.com/matrix-org/matrix-doc/blob/clokep/restricted-rooms/proposals/3083-restricted-rooms.md MRoomMembership = "m.room_membership" + // MSpaceChild https://spec.matrix.org/v1.7/client-server-api/#mspacechild-relationship + MSpaceChild = "m.space.child" + // MSpaceParent https://spec.matrix.org/v1.7/client-server-api/#mspaceparent-relationships + MSpaceParent = "m.space.parent" ) diff --git a/spec/roomtypes.go b/spec/roomtypes.go new file mode 100644 index 00000000..86a26116 --- /dev/null +++ b/spec/roomtypes.go @@ -0,0 +1,22 @@ +// Copyright 2023 The Matrix.org Foundation C.I.C. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +const ( + // Content key for room type in m.room.create event https://spec.matrix.org/v1.7/client-server-api/#mroomcreate + MRoomCreateTypeContentKey = "type" + // MSpace https://spec.matrix.org/v1.7/client-server-api/#types + MSpace = "m.space" +)