From 98bdd15846a7cbb7d79d6849f22710cade3742e4 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 23 May 2022 17:39:16 +0100 Subject: [PATCH] Preserve content from `/make_join` as well as supplied content in the request --- federationapi/internal/perform.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/federationapi/internal/perform.go b/federationapi/internal/perform.go index 7ccd68ef0..c176a6ea8 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) }