events: Add link to definition of m.room.encryption recommended defaults

This commit is contained in:
Kévin Commaille 2023-03-10 11:24:10 +01:00 committed by Kévin Commaille
parent 8a3bccaef1
commit d56386a636

View File

@ -45,6 +45,7 @@ impl RoomEncryptionEventContent {
/// Note that changing the values of the fields is not a breaking change and you shouldn't rely /// Note that changing the values of the fields is not a breaking change and you shouldn't rely
/// on those specific values. /// on those specific values.
pub fn with_recommended_defaults() -> Self { pub fn with_recommended_defaults() -> Self {
// Defaults defined at <https://spec.matrix.org/latest/client-server-api/#mroomencryption>
Self { Self {
algorithm: EventEncryptionAlgorithm::MegolmV1AesSha2, algorithm: EventEncryptionAlgorithm::MegolmV1AesSha2,
rotation_period_ms: Some(uint!(604_800_000)), rotation_period_ms: Some(uint!(604_800_000)),