Don't copy the public keys array

This commit is contained in:
Brendan Abolivier 2017-08-29 15:13:48 +01:00
parent 4bc6f64e97
commit 1076719c08
No known key found for this signature in database
GPG key ID: 8EF1500759F70623

View file

@ -335,11 +335,9 @@ func emit3PIDInviteEvent(
DisplayName: res.DisplayName,
KeyValidityURL: validityURL,
PublicKey: res.PublicKey,
PublicKeys: res.PublicKeys,
}
content.PublicKeys = make([]common.PublicKey, len(res.PublicKeys))
copy(content.PublicKeys, res.PublicKeys)
if err := builder.SetContent(content); err != nil {
return err
}