mtx::events::account_data::nheko_extensions::EventExpiry struct

Custom event to delete certain events automatically (e.g. after a certain time). Can be configured globally or per room.

Public variables

bool exclude_state_events
If state events should be protected from deletion. Defaults to false, however the latest state event of a specific (event_type,state_key) is always protected.
std::uint64_t expire_after_ms
When to delete old events. Set to 0 or remove to not delete events based on time. Uses the origin_server_ts so keep your clocks in sync. Too small of an expiration timeout might be annoying.
std::uint64_t protect_latest
Protect recent N messages from deletion, even if other criteria match. By default no messages are protected (but you need to configure a criteria to match anything anyway). This can be used to be less disruptive in recent conversations.
std::uint64_t keep_only_latest
Deletes anything but the latest N messages. Set to 0 to disable (because keeping no messages makes no sense, since then you would just send nothing). If this is lower than protect_latest, it will effectively default to that (but will be disabled when set to 0). Clients might run deletions only on a certain interval.