diff options
Diffstat (limited to 'haunt/jakob/utils')
| -rw-r--r-- | haunt/jakob/utils/comments.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/haunt/jakob/utils/comments.scm b/haunt/jakob/utils/comments.scm index e228a6d..8678a3a 100644 --- a/haunt/jakob/utils/comments.scm +++ b/haunt/jakob/utils/comments.scm @@ -213,7 +213,15 @@ (define (fetch-comments slug) "Blocking call to webmention.io to retrieve a vector of all Webmentions for `slug'" - (get-comments-by-slug slug)) + (let ((url (format #f "https://jakob.space/api/comments?p=~a" slug))) + (receive (response-status response-body) + (http-request url) + (chain response-body + (bytevector->string _ "UTF-8") + (json-string->scm _) + (vector->list _) + (map scm->json-string _) + (map (lambda (x) (call-with-input-string x json->internal-comment)) _))))) (define (fetch-webmentions slug) "Blocking call to webmention.io to retrieve a vector of all Webmentions for `slug'" |