Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC3137: Define space room type, subset of MSC1772 #3137

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions proposals/3137-spaces-room-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Proposal for Matrix Spaces room type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm somewhat with @erikjohnston in being confused on what it means to define a 'type of room to be a space' in advance of defining what a space actually is. Does this really need to be split out from #1772? Can we get #1772 through FCP instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can then even better. This was written solely for the worry that that would take too long


This MSC is broken out from
[MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772).

https://github.com/matrix-org/matrix-doc/pull/1840#issuecomment-460070485

## Background and objectives

As part of progressing [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772)
we have identified that we can obtain the greatest flexibility with the lowest risk by
separating out the space room type definition into its own MSC and get it stabilised
before the rest of the proposals.

That way any migrations therein do not need to burn and create new rooms, can just
migrate state events within the otherwise stable space rooms, this helps avoid yet
another room upgrade cycle, which is a very degraded experience, in the process of
getting Spaces out of the door.

## Proposal

Each space is represented by its own room, known as a "space-room".

Space-rooms are distinguished from regular messaging rooms by the presence of a
`type: m.space` property in the content of the `m.room.create` event. This allows clients to
offer slightly customised user experience depending on the purpose of the
room. Currently, no server-side behaviour is expected to depend on this property.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit of guidance on what a client that understands only this MSC might do could be nice, eg. display the room or hide it.


All other behaviours, additional functionality, endpoints, state events are to be
defined by other MSCs to allow the greatest flexibility.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to fill in the bits needed for FCP to be considered:

Suggested change
The `type` contains a normal identifier ([MSC2758](https://github.com/matrix-org/matrix-doc/pull/2758))
and should be assumed to be of a generic (ie: conversational) type when not present.

### Membership of spaces

Users can be members of spaces (represented by `m.room.member` state events as
normal). The existing [`m.room.history_visibility`
mechanism](https://matrix.org/docs/spec/client_server/r0.6.1#room-history-visibility)
controls whether membership of the space is required to view the room list,
membership list, etc.

"Public" or "community" spaces would be set to `world_readable` to allow clients
to see the directory of rooms within the space by peeking into the space-room
(thus avoiding the need to add `m.room.member` events to the event graph within
the room).

Join rules, invites and 3PID invites work as for a normal room, with the
exception that `invite_state` sent along with invites should be amended to
include the `m.room.create` event, to allow clients to discern whether an
invite is to a space-room or not.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this section made it in? Feels weird given the definition of a 'room list' didn't make it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I assume this applies to lines 32-48)

It might be best to remove this section for now and instead position the MSC as introducing a type (in counter to MSC1840, but without the bloat of Filter APIs), with m.space as a reserved identifier for something called "Spaces". This way, the spec has a path forward that disassociates the MSC from 1772.


## Related MSCs

* [MSC1772](https://github.com/matrix-org/matrix-doc/issues/1772): Matrix
spaces.

* [MSC2946](https://github.com/matrix-org/matrix-doc/issues/2946): Spaces
Summary API.

* [MSC3088](https://github.com/matrix-org/matrix-doc/issues/3088): Room
subtyping.

* [MSC1840](https://github.com/matrix-org/matrix-doc/issues/1840): Typed
rooms.

## Security considerations

None at present.

## Potential issues

None at present.

## Rejected alternatives

### Use a separate state event for type of room

[MSC1840](https://github.com/matrix-org/matrix-doc/pull/1840) proposes the use
of a separate `m.room.type` state event to distinguish different room
types. This implies that rooms can dynamically switch between being a Space,
and being a regular non-Space room. That is not a usecase we consider useful,
and allowing it would impose significant complexity on client implementations.

## Unstable prefix

The following mapping will be used for identifiers in this MSC during
development, they are inherited from MSC1772 to prevent yet another
breaking change:

Proposed final identifier | Purpose | Development identifier
------------------------------- | ------- | ----
`type` | property in `m.room.create` | `org.matrix.msc1772.type`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the type be org.matrix.msc1840.type or something, given types are defined in MSC1840?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would mean we lose all existing spaces twice

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh - i see, #1840 is mutable typing, whereas this is introducing immutable typing.

`m.space` | value of `type` in `m.room.create` | `org.matrix.msc1772.space`