Benutzer-Werkzeuge

Webseiten-Werkzeuge


howto:matrix:max_lifetime

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
howto:matrix:max_lifetime [2021/07/17 19:37]
unbuntu add info about already downloaded messgages
howto:matrix:max_lifetime [2022/02/26 15:42]
yadda add hint: conversion to milliseconds
Zeile 5: Zeile 5:
 <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> <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>
  
-Sadly, this setting is currently not exposed in Element. If you want to increase/decrease this time, do as follows:+----
  
-  * Find you personal access token in Element by: +It is possible to send custom events from developer tools of element web and set room retention time thereSomething likeRight-click a room → Settings → Advanced → Open developer tools → Send custom event
-    * Click on your username in the upper left corner +
-    * All settings > Help & About > Advanced +
-    * Access Token: <click to reveal> +
-  * Find room id in Element by: +
-    * Click on room info (i) in the upper right corner +
-    * Room settings > Advanced > Room information +
-    * Internal room ID: ...:systemli.org +
-  * The APi only accept time in miliseconds, so calulate a new time: +
-    * 1000*60*60*24*$number_of_days +
-  * Use curl to put another lifetime +
-<code> +
-curl -X PUT -d '{"max_lifetime": 7}' --header "Authorization: Bearer $your_access_token" 'https://matrix.systemli.org/_matrix/client/r0/rooms/$your_room_id/state/m.room.retention/'  +
-</code>+
  
-===== Check if custom retention time is set ===== +You'll first need to convert the desired time in days to milliseconds, i.e.: 1000*60*60*24*<number_of_days
-<code+ 
-curl --header "AuthorizationBearer $your_access_token" 'https://matrix.systemli.org/_matrix/client/r0/rooms/$your_room_id/state/m.room.retention       +  type   m.room.retention 
-</code> +  content: { "max_lifetime": 34560000002 } 
-If something custom is configured it should return something like <code>{"max_lifetime":$number_of_miliseconds}</code>+ 
 +Click the red "Event"-button and then send. 
 + 
 +After sending, you can verify that the retention is set: Go back and choose room state and m.room.retention there. 
 + 
 +---- 
 + 
 +Source: https://github.com/vector-im/element-web/issues/3800#issuecomment-1030568445
  
 ===== Further reading ===== ===== Further reading =====
howto/matrix/max_lifetime.txt · Zuletzt geändert: 2022/02/26 15:42 von yadda