element-hq / element-hq/synapse

Kicking an external user gives an error, even though it should be allowed by the specification

Open
#16,736 1 comment 0 reactions 0 assignees View on GitHub
A-Membership A-Spec-Compliance O-Uncommon S-Tolerable
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#16736](https://github.com/matrix-org/synapse/issues/16736).

---

### Description

The specification allows kicking an external user (https://spec.matrix.org/v1.8/client-server-api/#room-membership):

![image](https://github.com/matrix-org/synapse/assets/96489967/8dccacd8-712a-4e3d-9fd2-785582956e4e)

However, Synapse returns an error when you try to kick a user that is external:

```
{'errcode': 'M_FORBIDDEN', 'error': 'The target user is not in the room'}
```

### Steps to reproduce

- Create a room
- Try to kick a user that is not in the room

### Homeserver

local

### Synapse Version

v1.93.0

### Installation Method

Docker (matrixdotorg/synapse)

### Database

SQLite

### Workers

Single process

### Platform

Docker Container (`matrixdotorg/synapse:v1.93.0`)

### Configuration

We use the default homeserver options, but with ratelimiting disabled.

### Relevant log output

```shell
n/a
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.