Include membership event in stripped invite state

This commit is contained in:
Neil Alexander 2020-04-23 09:52:17 +01:00
parent adc7f36d38
commit 45149588c9

View file

@ -190,8 +190,12 @@ func (s *OutputRoomEventConsumer) processInvite(oie api.OutputNewInviteEvent) er
// When sending a v2 invite, the inviting server should try and include // When sending a v2 invite, the inviting server should try and include
// a "stripped down" version of the room state. This is pretty much just // a "stripped down" version of the room state. This is pretty much just
// enough information for the remote side to show something useful to the // enough information for the remote side to show something useful to the
// user, like the room name, aliases etc. // user, like the room name, aliases etc. Initially we'll strip down
strippedState := []gomatrixserverlib.InviteV2StrippedState{} // the invite event itself, as this satisfies the membership event in the
// stripped state.
strippedState := []gomatrixserverlib.InviteV2StrippedState{
gomatrixserverlib.NewInviteV2StrippedState(&oie.Event.Event),
}
stateWanted := []string{ stateWanted := []string{
gomatrixserverlib.MRoomName, gomatrixserverlib.MRoomCanonicalAlias, gomatrixserverlib.MRoomName, gomatrixserverlib.MRoomCanonicalAlias,
gomatrixserverlib.MRoomAliases, gomatrixserverlib.MRoomJoinRules, gomatrixserverlib.MRoomAliases, gomatrixserverlib.MRoomJoinRules,