diff --git a/lib/v2/rattibha/user.js b/lib/v2/rattibha/user.js
index 8aa1dbc640..124c4a657a 100644
--- a/lib/v2/rattibha/user.js
+++ b/lib/v2/rattibha/user.js
@@ -21,15 +21,17 @@ module.exports = async (ctx) => {
pubDate: parseDate(item.thread.created_at),
updated: parseDate(item.thread.updated_at),
author: userData.name,
- api_link: `${baseUrl}/threads?id=${item.thread_id}`,
+ threadData1URL: `${baseUrl}/thread?id=${item.thread_id}`,
+ threadData2URL: `${baseUrl}/threads?id=${item.thread_id}`,
}));
// Get tweet full text
const items = await Promise.all(
list.map((item) =>
- ctx.cache.tryGet(item.api_link, async () => {
- const { data: threads } = await got(item.api_link, { headers: { accept: 'application/json' } });
- item.description = threads.reduce((accumulator, tweet) => `${accumulator}${tweet.tweet_detail.info.text}
`, '');
+ ctx.cache.tryGet(item.link, async () => {
+ const { data: data1 } = await got(item.threadData1URL, { headers: { accept: 'application/json' } });
+ const { data: data2 } = await got(item.threadData2URL, { headers: { accept: 'application/json' } });
+ item.description = [...data1.tweets, ...data2].reduce((accumulator, tweet) => `${accumulator}${tweet.tweet_detail.info.text}
`, '');
return item;
})
)