diff --git a/src/miraktest-twitter/components/Tweet.tsx b/src/miraktest-twitter/components/Tweet.tsx index 75d4ef9..91924d3 100644 --- a/src/miraktest-twitter/components/Tweet.tsx +++ b/src/miraktest-twitter/components/Tweet.tsx @@ -217,6 +217,7 @@ export const TweetComponent: React.FC<{ q: serviceTags.join(" OR ") + " exclude:retweets", locale: "ja", result_type: "recent", + count: 30, }) .then((tweets: Search | { data: Search }) => { const statuses = @@ -225,8 +226,16 @@ export const TweetComponent: React.FC<{ const lowServiceTags = serviceTags.map((tag) => tag.toLowerCase() ) - const sortedHashtags = Object.entries( + const dedupedByUser = Array.from( statuses + .reduce((arr, status) => { + arr.set(status.user.id_str, status) + return arr + }, new Map()) + .values() + ) + const sortedHashtags = Object.entries( + dedupedByUser .map( (status) => ( diff --git a/src/miraktest-twitter/constants.ts b/src/miraktest-twitter/constants.ts index fc69bfa..80c1285 100644 --- a/src/miraktest-twitter/constants.ts +++ b/src/miraktest-twitter/constants.ts @@ -4,7 +4,7 @@ export const TWITTER_META = { id: TWITTER_PLUGIN_ID, name: "Twitter", author: "ci7lus", - version: "0.0.5", + version: "0.0.6", description: "視聴中の番組に関連するツイートを投稿する", } export const TWITTER_TWEET_WINDOW_ID = `${TWITTER_PLUGIN_ID}.tweet`