From 7d1c9dd660df555f382171cced412ec1d6f49ef2 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 26 Apr 2026 19:25:45 -0300 Subject: Implement CHATHISTORY subcommands, TOPIC events, REDACT cap filter Major chathistory work: - Add CHATHISTORY BEFORE/AFTER/BETWEEN/AROUND with msgid/timestamp anchors - Filter redacted messages from history per spec - Persist TOPIC events for event-playback support - Use historical timestamps in CHATHISTORY responses - Support DM history queries (msg-to-self and between users) - Add draft/event-playback capability REDACT improvements: - Only deliver REDACT to clients with draft/message-redaction cap - Add msgid/time tags to generic TAGMSG handler - FAIL responses include subcommand context per spec Tag-line refactoring: - Add tag-line-at helper for stored event timestamps - Share msg-at between event store and broadcast in PRIVMSG/TOPIC - Use ISO time with explicit Date instead of double iso-time call --- tests/unit.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/unit.clj b/tests/unit.clj index 687c91f..fad96fc 100644 --- a/tests/unit.clj +++ b/tests/unit.clj @@ -1536,10 +1536,12 @@ (testing "REDACT deletes and notifies (draft/message-redaction)" (let [alice-out (java.io.ByteArrayOutputStream.) bob-out (java.io.ByteArrayOutputStream.) + bob-atom (atom {:caps #{"draft/message-redaction"}}) {:keys [test-network-id] :as components} (assoc (test-components-with-network) :clients (atom {"alice" {:w alice-out} - "bob" {:w bob-out}}) + "bob" {:w bob-out + :client-atom bob-atom}}) :channels (atom {})) conn (:conn components) alice (registered-client "alice" alice-out test-network-id)] -- cgit v1.3