(sigil irc read-marker)
(sigil irc read-marker) - draft/read-marker capability helpers
The draft/read-marker capability gives clients a way to sync the "last-read" position of a target (channel or nick) across devices. The wire surface is two messages:
C: MARKREAD <target> [timestamp=<RFC-3339-UTC>] S: MARKREAD <target> timestamp=<RFC-3339-UTC>
A query (no timestamp) asks the server for the current value. A set (with timestamp) updates the server's stored value, and the server echoes the new state back to all sessions of the same account so other devices learn the new marker.
Spec: https://ircv3.net/specs/extensions/read-marker
Exports
read-markerprocedureA single read-marker datum: target string + optional timestamp. A query has timestamp #f; an updated/echoed marker carries an RFC 3339 UTC timestamp.
read-marker?procedureTest if a value is a read-marker struct.
read-marker-targetprocedureGet the target field of a read-marker struct.
read-marker-timestampprocedureGet the timestamp field of a read-marker struct.
parse-markread-lineprocedureParse a MARKREAD <target> [timestamp=...] line. Accepts both the client→server form (timestamp optional) and the server→client form (timestamp present). Returns a read-marker record on success, #f on malformed input.
markread-query-lineprocedureBuild a query line: client asking the server for the current marker for target.
(markread-query-line "#channel")
; => "MARKREAD #channel\r\n"markread-set-linevariableBuild a set/echo line: client setting (or server echoing) a marker. timestamp is an RFC 3339 UTC string.
(markread-set-line "#channel" "2026-04-27T12:00:00.000Z")
; => "MARKREAD #channel timestamp=2026-04-27T12:00:00.000Z\r\n"READ-MARKER-CAPvariable(No description)
make-read-markervariable(No description)