diff --git a/event-schemas/examples/m.room.encryption b/event-schemas/examples/m.room.encryption index 25b1271f..4c6342bb 100644 --- a/event-schemas/examples/m.room.encryption +++ b/event-schemas/examples/m.room.encryption @@ -1,6 +1,8 @@ { "content": { - "algorithm": "m.megolm.v1.aes-sha2" + "algorithm": "m.megolm.v1.aes-sha2", + "rotation_period_ms": 604800000, + "rotation_period_msgs": 100 }, "event_id": "$WLGTSEFJJKJ:localhost", "origin_server_ts": 1476648761524, diff --git a/event-schemas/schema/m.room.encryption b/event-schemas/schema/m.room.encryption index 14778efa..b990a13b 100644 --- a/event-schemas/schema/m.room.encryption +++ b/event-schemas/schema/m.room.encryption @@ -10,6 +10,16 @@ properties: description: |- The encryption algorithm to be used to encrypt messages sent in this room. For example, ``m.megolm.v1.aes-sha2``. + rotation_period_ms: + type: integer + description: |- + How long the session should be used before changing it. ``604800000`` + (a week) is the recommended default. + rotation_period_msgs: + type: integer + description: |- + How many messages should be sent before changing the session. ``100`` is the + recommended default. required: - algorithm type: object