add missing ban reason to ban events

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-01-14 18:43:05 -05:00 committed by June
parent 2f16726bac
commit 2074e36aa4
2 changed files with 2 additions and 0 deletions

View file

@ -51,3 +51,4 @@
- Add basic cache eviction for true destinations when requests fail if we use a cached destination (e.g. a server has modified their well-known and we're still connecting to the old destination)
- Only follow 6 redirects total in our default reqwest ClientBuilder
- Generate passwords with 25 characters instead of 15
- Add missing `reason` field to user ban events (`/ban`)

View file

@ -259,6 +259,7 @@ pub async fn ban_user_route(body: Ruma<ban_user::v3::Request>) -> Result<ban_use
serde_json::from_str(event.content.get())
.map(|event: RoomMemberEventContent| RoomMemberEventContent {
membership: MembershipState::Ban,
reason: event.reason,
..event
})
.map_err(|_| Error::bad_database("Invalid member event in database."))