User Tools

Site Tools


en:howto:matrix:max_lifetime

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:howto:matrix:max_lifetime [2022/11/29 18:49] – gelöscht - Externe Bearbeitung (Unknown date) 127.0.0.1en:howto:matrix:max_lifetime [2026/01/05 14:55] (current) – Fix howto y
Line 1: Line 1:
 +====== Change Matrix room retention time ======
  
 +Systemli's Matrix home server instance has a default retention time of 30 days. We allow values from 1-180 days. 
 +
 +<note important>Clients that have already downloaded and stored the event/message might continue to show it, unless they themselves implement support for message retention policies, the homeserver can not do anything about this.</note>
 +
 +----
 +
 +It is possible to send custom events from developer tools of element web and set room retention time there.
 +  - The developer tools can be opened by typing ''/devtools'' in the message editor.
 +  - In the devtools, select "Explore room state"
 +  - If the retention has not previously set, `m.room.retention` will not show up in the overview
 +  - Click "Send custom state event" 
 +    - You'll first need to convert the desired time in days to milliseconds, i.e.: 1000*60*60*24*<number_of_days>
 +    - Event Type: <code>m.room.retention</code>
 +    - Event Content: <code>
 +{
 +    "max_lifetime": 2592000000
 +}</code>
 +    - State Key: leave this empty
 +    - Click "Send"
 +
 +After sending, you can verify that the retention is set: Go back and choose "Explore room state". Now ''m.room.retention'' should show up in the overview. 
 +
 +----
 +
 +Source: https://github.com/vector-im/element-web/issues/3800#issuecomment-1030568445
 +
 +===== Further reading =====
 +
 +  * [[https://github.com/matrix-org/synapse/blob/develop/docs/message_retention_policies.md#room-configuration|Matrix Message retention policies]]
 +  * [[https://spec.matrix.org/latest/|Matrix Client API documentation]]

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki