feat(rooms): Disappearing Messages (MSC1763 m.room.retention)
B1 of the Matrix protocol-gaps roadmap, gate-green (688 tests): - StateEvent.RoomRetention + a shared utils/retention.ts (presets, isExpired, getRoomRetentionMs) with tests. - RoomRetention settings control (PL-gated preset buttons Off/1d/1w/1m) in Room Settings → General → Message Retention. - Timeline hides events past the room's max_lifetime (gated behind Show Hidden Events, like redactions) — messages visually disappear, losslessly. - Opt-in setting enforceRetentionLocally (default OFF) + a headless RetentionSweeper that permanently redacts the user's OWN expired messages (own-only, loaded-timeline scope, dedupe + retry). Nothing auto-deletes unless the user opts in. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -183,6 +183,9 @@ export interface Settings {
|
||||
urlPreview: boolean;
|
||||
encUrlPreview: boolean;
|
||||
showHiddenEvents: boolean;
|
||||
// [MSC1763] Opt-in: permanently redact your OWN messages once a room's
|
||||
// retention window passes (default off — nothing auto-deletes by surprise).
|
||||
enforceRetentionLocally: boolean;
|
||||
legacyUsernameColor: boolean;
|
||||
|
||||
showNotifications: boolean;
|
||||
@@ -288,6 +291,7 @@ const defaultSettings: Settings = {
|
||||
urlPreview: true,
|
||||
encUrlPreview: true,
|
||||
showHiddenEvents: false,
|
||||
enforceRetentionLocally: false,
|
||||
legacyUsernameColor: false,
|
||||
|
||||
showNotifications: true,
|
||||
|
||||
Reference in New Issue
Block a user