Use reference for third party invite data

This commit is contained in:
Brendan Abolivier 2017-09-05 16:40:07 +01:00
parent b3c9f6469d
commit 310175c71c
No known key found for this signature in database
GPG key ID: 8EF1500759F70623
2 changed files with 6 additions and 6 deletions

View file

@ -26,7 +26,7 @@ type MemberContent struct {
DisplayName string `json:"displayname,omitempty"` DisplayName string `json:"displayname,omitempty"`
AvatarURL string `json:"avatar_url,omitempty"` AvatarURL string `json:"avatar_url,omitempty"`
Reason string `json:"reason,omitempty"` Reason string `json:"reason,omitempty"`
ThirdPartyInvite TPInvite `json:"third_party_invite,omitempty"` ThirdPartyInvite *TPInvite `json:"third_party_invite,omitempty"`
} }
// TPInvite is the "Invite" structure defined at http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-member // TPInvite is the "Invite" structure defined at http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-member

View file

@ -113,7 +113,7 @@ func createInviteFrom3PIDInvite(
content := common.MemberContent{ content := common.MemberContent{
// TODO: Load the profile // TODO: Load the profile
Membership: "invite", Membership: "invite",
ThirdPartyInvite: common.TPInvite{ ThirdPartyInvite: &common.TPInvite{
Signed: inv.Signed, Signed: inv.Signed,
}, },
} }