Preserve content from /make_join as well as supplied content in the request

This commit is contained in:
Neil Alexander 2022-05-23 17:39:16 +01:00
parent b5a497a0c0
commit 98bdd15846
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -166,7 +166,8 @@ func (r *FederationInternalAPI) performJoinUsingServer(
if content == nil {
content = map[string]interface{}{}
}
content["membership"] = "join"
_ = json.Unmarshal(respMakeJoin.JoinEvent.Content, &content)
content["membership"] = gomatrixserverlib.Join
if err = respMakeJoin.JoinEvent.SetContent(content); err != nil {
return fmt.Errorf("respMakeJoin.JoinEvent.SetContent: %w", err)
}