summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2026-04-26 10:21:37 -0300
committerEuAndreh <eu@euandre.org>2026-04-26 10:21:37 -0300
commit82162bbef5d67e660faae1d2d08a06638b7faff3 (patch)
treeb4e2d53c7405ccca3d6e8a68ecdfca22f70588ee /tests
parentTruncate outgoing lines to 512 bytes; safe UTF-8 input handling (diff)
downloadpapod-82162bbef5d67e660faae1d2d08a06638b7faff3.tar.gz
papod-82162bbef5d67e660faae1d2d08a06638b7faff3.tar.xz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit.clj5
1 files changed, 3 insertions, 2 deletions
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)))