matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.12k forks source link

You can't join a restricted room if the owner doesn't have invite privs #16741

Open NiallBunting opened 11 months ago

NiallBunting commented 11 months ago

Description

If you try to create a restricted room where the invite permission is above the user creating the room others can't join.

The user creating the room is in there (all alone forever).

If you try to join the room: M_UNKNOWN: Can't join remote room because no servers that are in the room have been provided.

Steps to reproduce

// Using the dart library

await createGroupChat(groupName: name, enableEncryption: false, initialState: [ StateEvent(content: { "join_rule": "restricted", "allow": [ { "type": "m.room_membership", "room_id": parent.id } ] }, type: 'm.room.join_rules'), ], powerLevelContentOverride: {"invite": 101}, );

Homeserver

personal

Synapse Version

1.96.1

Installation Method

pip (from PyPI)

Database

SQLite

Workers

Single process

Platform

Ubuntu

Configuration

No response

Relevant log output

2023-12-10 01:28:03,661 - synapse.http.server - 124 - INFO - POST-5040 - <XForwardedForRequest at 0x7fee64448130 method='POST' uri='/_matrix/client/v3/join/!XGTHQBVcQaFrtCLadF%3Adomain.co.uk?server_name=https%3A%2F%2Fdomain.co.uk' clientproto='HTTP/1.0' site='8069'> SynapseError: 404 - Can't join remote room because no servers that are in the room have been provided.
2023-12-10 01:28:03,664 - synapse.access.http.8069 - 465 - INFO - POST-5040 - 172.69.79.187 - 8069 - {@test.1:domain.co.uk} Processed request: 0.032sec/0.001sec (0.011sec, 0.000sec) (0.003sec/0.008sec/8) 116B 404 "POST /_matrix/client/v3/join/!XGTHQBVcQaFrtCLadF%3Adomain.co.uk?server_name=https%3A%2F%domain.co.uk HTTP/1.0" "Dart/3.2 (dart:io)" [0 dbevts]

Anything else that would be useful to know?

No response