diff options
| author | EuAndreh <eu@euandre.org> | 2026-04-26 10:21:37 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2026-04-26 10:21:37 -0300 |
| commit | 82162bbef5d67e660faae1d2d08a06638b7faff3 (patch) | |
| tree | b4e2d53c7405ccca3d6e8a68ecdfca22f70588ee /tests/unit.clj | |
| parent | Truncate outgoing lines to 512 bytes; safe UTF-8 input handling (diff) | |
| download | papod-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/unit.clj')
| -rw-r--r-- | tests/unit.clj | 5 |
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))) |
