diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-05-23 17:54:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 17:54:01 +0100 |
commit | 447226790153afc47b62df4d81f66ec7129dca90 (patch) | |
tree | efaa5474cd39646e843262b226a225c1bf9a8cbf | |
parent | 8a7567c652fb490f8d6d4e25fc2b282fd4d8c76c (diff) |
Preserve content from `/make_join` as well as supplied content in the request (#2481)
-rw-r--r-- | federationapi/internal/perform.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/federationapi/internal/perform.go b/federationapi/internal/perform.go index 7ccd68ef..c176a6ea 100644 --- a/federationapi/internal/perform.go +++ b/federationapi/internal/perform.go @@ -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) } |