0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-14 00:33:53 +01:00

Strip join_authorised_by_users_server when updating membership events using /rooms/{roomID}/state (#2482)

This commit is contained in:
Neil Alexander 2022-05-24 09:11:23 +01:00 committed by GitHub
parent 20844942a8
commit c83837e684
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,6 +104,13 @@ func SendEvent(
return *resErr
}
// If we're sending a membership update, make sure to strip the authorised
// via key if it is present, otherwise other servers won't be able to auth
// the event if the room is set to the "restricted" join rule.
if eventType == gomatrixserverlib.MRoomMember {
delete(r, "join_authorised_by_users_server")
}
evTime, err := httputil.ParseTSParam(req)
if err != nil {
return util.JSONResponse{