diff --git a/src/_data/posts.js b/src/_data/posts.js index c6235a2..2e7a245 100644 --- a/src/_data/posts.js +++ b/src/_data/posts.js @@ -49,10 +49,14 @@ class PostCache { } async fetchComments() { - const comments = [...await this.fetchCommentsByType(), ...await this.fetchCommentsByType("webmention")]; + const likes = await this.fetchCommentsByType("like"); + const mentions = await this.fetchCommentsByType(); + const reposts = await this.fetchCommentsByType("repost"); + const comments = [...likes, ...mentions, ...reposts]; + console.log(reposts[0]); + comments.forEach(comment => { - console.log(comment.post); if (this.posts[comment.post]) { this.posts[comment.post].comments[comment.id] = comment; } @@ -88,11 +92,11 @@ class PostCache { } } -const mapComment = comment => ({ +const mapComment = comment => ({ author: { name: comment.author_name, avatars: comment.author_avatar_urls, - url: comment.meta.semantic_linkbacks_author_url, + url: comment.author_url, }, content: comment.content.rendered, canonical: comment.meta.url,