Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/direct_messaging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ func TestIsDirectFlagFederation(t *testing.T) {
"is_direct": true,
},
})
inviteReq, err := fclient.NewInviteV2Request(dmInviteEvent, []gomatrixserverlib.InviteStrippedState{})
createEvent := room.Timeline[0]
inviteReq, err := fclient.NewInviteV2Request(dmInviteEvent, []gomatrixserverlib.InviteStrippedState{gomatrixserverlib.NewInviteStrippedState(createEvent)})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So slight annoyance here, the spec does say that this should be a full event rather than a stripped event. This does work for now, but the ecosystem is meant to be moving towards requiring it to be the full event.

I'm not sure if it'd be easier to update NewInviteV2Request function or manually create the response

@RasmusRendal RasmusRendal Oct 27, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first intuition, without knowing much about gomatrixserverlib, is that fixing that seems like a better solution than duplicating its behaviour in Complement. I made a draft PR for it here, and it doesn't seem to be a super complicated change.

I ran this branch with the changes to gomatrixserverlib, and I just had to change the line to

inviteReq, err := fclient.NewInviteV2Request(dmInviteEvent, []gomatrixserverlib.PDU{createEvent})

which seems reasonable.

But I admittedly really don't know what I'm doing with go or gomatrixserverlib.

if err != nil {
t.Fatalf("failed to make invite request: %s", err)
}
Expand Down