Fix reposts and likes on site. TODO: Fix missing avatars
This commit is contained in:
parent
38c568cc1a
commit
33db96ffec
@ -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;
|
||||
}
|
||||
@ -92,7 +96,7 @@ 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,
|
||||
|
Loading…
Reference in New Issue
Block a user