feat: ephemeral channels with TTL-based auto-archiving (#232)

Co-authored-by: Wes <wesbillman@users.noreply.github.com>
This commit is contained in:
Bradley Axen
2026-04-07 11:37:51 -07:00
committed by GitHub
co-authored by Wes
parent 3da5e5cafe
commit c07b14bd9f
20 changed files with 327 additions and 16 deletions
+5 -1
View File
@@ -39,13 +39,17 @@ CREATE TABLE channels (
purpose TEXT,
purpose_set_by BYTEA,
purpose_set_at TIMESTAMPTZ,
participant_hash BYTEA
participant_hash BYTEA,
ttl_seconds INT,
ttl_deadline TIMESTAMPTZ
);
CREATE INDEX idx_channels_type ON channels (channel_type);
CREATE INDEX idx_channels_visibility ON channels (visibility);
CREATE INDEX idx_channels_created_by ON channels (created_by);
CREATE UNIQUE INDEX idx_channels_dm_hash ON channels (participant_hash);
CREATE INDEX idx_channels_ttl_expiry ON channels (ttl_deadline)
WHERE ttl_seconds IS NOT NULL AND archived_at IS NULL AND deleted_at IS NULL;
-- ── Channel members ───────────────────────────────────────────────────────────