~williewillus/r16

6d26fd3e5ab61113b1af6ad743e0c2f2880b6eb3 — Vincent Lee 18 days ago c7dada3
Redact custom-write implementing objects from being outputted
1 files changed, 3 insertions(+), 2 deletions(-)

M main.rkt
M main.rkt => main.rkt +3 -2
@@ 428,8 428,9 @@

(define (create-message-with-contents client channel message . contents)
  (let* ([content (apply ~a #:separator "\n"
                         (filter-not (disjoin void? http:attachment? empty-string?)
                                     contents))]
                         (~>> contents
                              (map (lambda (x) (if (custom-write? x) "#<redacted>" x)))
                              (filter-not (disjoin void? http:attachment? empty-string?))))]
         [attachment (findf http:attachment? contents)]
         [content (if (or attachment (non-empty-string? content))
                      (truncate-string content char-cap)