Explorar el Código

Add author to jsonfeed

Thomas Dy hace 3 años
padre
commit
21534b3be3
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      format.ts

+ 5 - 0
format.ts

@@ -251,6 +251,11 @@ export function timelineAsJSON(username: string, tweets: Tweet[]): string {
       url: buildTwitterUrl(`/${tweet.user.screen_name}/status/${tweet.id_str}`),
       content_html: html,
       date_published: new Date(tweet.created_at).toISOString(),
+      authors: [{
+        name: `${displayTweet.user.name} - @${displayTweet.user.screen_name}`,
+        url: buildTwitterUrl(`/${displayTweet.user.screen_name}`),
+        avatar: displayTweet.user.profile_image_url_https,
+      }],
     };
   });
   return JSON.stringify({