From 0d0730552a03eb93d2476d351fd38c77e5742f36 Mon Sep 17 00:00:00 2001 From: Sean Quah Date: Wed, 25 May 2022 20:33:16 +0100 Subject: [PATCH] Set the depth of join events returned from `/make_join` Signed-off-by: Sean Quah --- internal/federation/handle.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/federation/handle.go b/internal/federation/handle.go index 4133e79e..fd4d0dbd 100644 --- a/internal/federation/handle.go +++ b/internal/federation/handle.go @@ -45,6 +45,7 @@ func MakeJoinRequestsHandler(s *Server, w http.ResponseWriter, req *http.Request Type: "m.room.member", StateKey: &userID, PrevEvents: []string{room.Timeline[len(room.Timeline)-1].EventID()}, + Depth: room.Timeline[len(room.Timeline)-1].Depth() + 1, } err := builder.SetContent(map[string]interface{}{"membership": gomatrixserverlib.Join}) if err != nil {