element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.17k stars 1.99k forks source link

Add the option to create unfederated spaces #28266

Closed Twi1ightSparkle closed 1 week ago

Twi1ightSparkle commented 1 week ago

Your use case

What would you like to do?

To be able to create unfederated spaces using Element

Why would you like to do it?

To make it easier to create a more secured section on my otherwise federated server

How would you like to achieve it?

Add an option in the space creation modal to make the space unfederated ("m.federate": false) similar to the room creation modal

screenshot_2024-10-22T10-42-36Z

Have you considered any alternatives?

You can manually call the client-server API, but this is not very convenient or user-friendly

curl --request POST \
  --url 'https://matrix.your-server.tld/_matrix/client/r0/createRoom' \
  --header 'Authorization: Bearer your_accessToken' \
  --header 'content-type: application/json' \
  --data '{
  "name": "Example unfederated, private space",
  "topic": "Optionally add a topic here",
  "preset": "private_chat",
  "visibility": "private",
  "power_level_content_override": {
    "events_default": 100,
    "invite": 50
  },
  "creation_content": {
    "type": "m.space",
    "m.federate": false
  },
  "initial_state": [
    {
      "type": "m.room.guest_access",
      "state_key": "",
      "content": {
        "guest_access": "can_join"
      }
    },
    {
      "type": "m.room.history_visibility",
      "content": {
        "history_visibility": "invited"
      }
    }
  ]
}'

Additional context

Element does handle/support unfederated spaces other than creating them

screenshot_2024-10-22T10-35-29Z

Optionally, child rooms created under unfederated spaces should default to also be unfederated.

t3chguy commented 1 week ago

Duplicate of https://github.com/element-hq/element-meta/discussions/741