Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Performing a room upgrade on a space will not transition the type #10207

Closed
clokep opened this issue Jun 18, 2021 · 1 comment · Fixed by #10774
Closed

Performing a room upgrade on a space will not transition the type #10207

clokep opened this issue Jun 18, 2021 · 1 comment · Fixed by #10774
Assignees
Labels
T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@clokep
Copy link
Member

clokep commented Jun 18, 2021

If a room upgrade is performed on a space then the type field from the content will be lost.

We seem to pull across the m.federate content:

# Get old room's create event
old_room_create_event = await self.store.get_create_event_for_room(old_room_id)
# Check if the create event specified a non-federatable room
if not old_room_create_event.content.get("m.federate", True):
# If so, mark the new room as non-federatable as well
creation_content["m.federate"] = False

But I wonder if we should start with the old event's content and then splat room_version and predecessor on top of it?

The spec is a bit vague, but seems to imply we shouldn't even be copying m.federate:

Creates a replacement room with a m.room.create event containing a predecessor field and the applicable room_version.

We also will want to copy the m.space.child and m.space.parent events from the space. It is unclear what we would do with the m.space.parent events in rooms that point to the space.

This might need an MSC for discussion, or might just be an implementation detail.

@clokep clokep added the T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. label Jun 18, 2021
@clokep clokep self-assigned this Jun 18, 2021
@clokep
Copy link
Member Author

clokep commented Sep 7, 2021

@turt2live and I had a discussion about this in matrix-spec: https://matrix.to/#/!NasysSDfxKxZBzJJoE:matrix.org/$ia7ZPMbF4BazNtABrnBOSxmUQCeNufcJFYcn_0-pdFs?via=matrix.org&via=libera.chat&via=vector.modular.im

The conclusion was that the spec purposefully leaves this vague and implementation dependent.

I think what we should probably do is: If room_type = m.space, then copy any m.space.child events over.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant