2024-06-19 07:53:27 +02:00
|
|
|
<!-- @format -->
|
|
|
|
|
2023-07-05 12:42:48 +02:00
|
|
|
# `im.nheko.event_expiry`
|
|
|
|
|
2024-02-24 20:32:38 +01:00
|
|
|
- Two unit conversion tools from `m.room.retention` notes:
|
|
|
|
- https://unitchefs.com/milliseconds/days/
|
|
|
|
- https://unitchefs.com/days/milliseconds/
|
|
|
|
|
2024-02-25 10:50:07 +01:00
|
|
|
---
|
|
|
|
|
2023-07-05 15:23:08 +02:00
|
|
|
<!-- prettier-ignore-start -->
|
|
|
|
|
|
|
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
|
|
|
2024-02-20 08:42:27 +01:00
|
|
|
- [Disable](#disable)
|
2023-12-07 09:04:10 +01:00
|
|
|
- [28 days](#28-days)
|
2024-02-20 08:42:27 +01:00
|
|
|
- [Example with keep only x messages & always keep](#example-with-keep-only-x-messages--always-keep)
|
2023-07-05 15:23:08 +02:00
|
|
|
- [31 days](#31-days)
|
|
|
|
- [365 days](#365-days)
|
|
|
|
|
|
|
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
|
|
|
|
<!-- prettier-ignore-end -->
|
|
|
|
|
2024-02-25 10:50:07 +01:00
|
|
|
---
|
|
|
|
|
2024-02-20 08:42:27 +01:00
|
|
|
## Disable
|
|
|
|
|
|
|
|
- Expire events after 0 days
|
|
|
|
- Only keep latest 0 events
|
|
|
|
- Always keep latest 0 events
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"exclude_state_events": true
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-12-07 09:04:10 +01:00
|
|
|
## 28 days
|
|
|
|
|
|
|
|
_Also known as 4 weeks._
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"exclude_state_events": true,
|
|
|
|
"expire_after_ms": 2419200000
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-02-20 08:42:27 +01:00
|
|
|
### Example with keep only x messages & always keep
|
|
|
|
|
|
|
|
- Expire events after 28 days
|
|
|
|
- Only keep latest 5 events
|
|
|
|
- Always keep latest 1 events
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"exclude_state_events": true,
|
|
|
|
"expire_after_ms": 2419200000,
|
|
|
|
"keep_only_latest": 5,
|
|
|
|
"protect_latest": 1
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-07-05 15:23:08 +02:00
|
|
|
## 31 days
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2023-11-04 09:39:37 +01:00
|
|
|
"exclude_state_events": true,
|
2023-07-05 15:23:08 +02:00
|
|
|
"expire_after_ms": 2678400000
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## 365 days
|
|
|
|
|
|
|
|
```json
|
2023-07-05 12:42:48 +02:00
|
|
|
{
|
2023-11-04 09:39:37 +01:00
|
|
|
"exclude_state_events": true,
|
2023-07-05 15:23:08 +02:00
|
|
|
"expire_after_ms": 31536000000
|
2023-07-05 12:42:48 +02:00
|
|
|
}
|
|
|
|
```
|