From 82162bbef5d67e660faae1d2d08a06638b7faff3 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 26 Apr 2026 10:21:37 -0300 Subject: Improve labeled-response, TAGMSG, and parser robustness - Move label tag insertion into existing tag prefix instead of emitting two separate @-prefixed sections. - Echo of PRIVMSG to sender now omits msgid/time tags unless the sender has message-tags or server-time capability. - Generic TAGMSG: forward to direct recipients (with message-tags cap), echo back to sender (with echo-message + message-tags), filter the label tag from the recipient copy. - Empty replies for labeled commands now produce a labeled ACK (without server prefix), matching IRCv3 labeled-response. - Accept silent PONG and parse loose command tokens (allow any non-space char) so labeled NONEXISTENT_COMMAND yields a labeled 421 instead of crashing the connection. --- tests/unit.clj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/unit.clj b/tests/unit.clj index 1345501..c398350 100644 --- a/tests/unit.clj +++ b/tests/unit.clj @@ -1689,8 +1689,9 @@ (let [replies (handle-privmsg ["#test" ":no-echo"] alice components)] (is (empty? replies))) - ;; With echo-message: reply includes the message - (swap! alice assoc :caps #{"echo-message"}) + ;; With echo-message + message-tags: reply has @msgid= + (swap! alice assoc :caps + #{"echo-message" "message-tags"}) (let [replies (handle-privmsg ["#test" ":with-echo"] alice components)] (is (= 1 (count replies))) -- cgit v1.3