From bb163e3d3cf669959de86b86c23ebcf66d007e9c Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Fri, 8 May 2020 16:16:14 +0100 Subject: [PATCH] Do not add event twice --- roomserver/internal/input_events.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roomserver/internal/input_events.go b/roomserver/internal/input_events.go index fa200085..f57dca7d 100644 --- a/roomserver/internal/input_events.go +++ b/roomserver/internal/input_events.go @@ -305,15 +305,15 @@ func buildInviteStrippedState( if err != nil { return nil, err } + inputEventUnwrapped := input.Event.Unwrap() inviteState := []gomatrixserverlib.InviteV2StrippedState{ - gomatrixserverlib.NewInviteV2StrippedState(&input.Event.Event), + gomatrixserverlib.NewInviteV2StrippedState(&inputEventUnwrapped), } - stateEvents = append(stateEvents, types.Event{Event: input.Event.Unwrap()}) + // stateEvents = append(stateEvents, types.Event{Event: inputEventUnwrapped}) for _, event := range stateEvents { inviteState = append(inviteState, gomatrixserverlib.NewInviteV2StrippedState(&event.Event)) } - fmt.Printf("INVITE STATE: %v\n \n", inviteState) return inviteState, nil }