mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat: quote repost and reply info for twitter and jike
This commit is contained in:
+7
-4
@@ -109,10 +109,13 @@ module.exports = async (ctx) => {
|
||||
pubDate: parseDate(item.createdAt),
|
||||
link: getLink(item.id, item.type),
|
||||
_extra: repostContent && {
|
||||
quote: {
|
||||
url: getLink(item.target.id, item.target.type),
|
||||
content_html: repostContent,
|
||||
},
|
||||
links: [
|
||||
{
|
||||
url: getLink(item.target.id, item.target.type),
|
||||
content_html: repostContent,
|
||||
type: 'quote',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
+26
-6
@@ -385,12 +385,32 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
|
||||
pubDate: parseDate(item.created_at),
|
||||
link: `https://twitter.com/${item.user.screen_name}/status/${item.id_str}`,
|
||||
|
||||
_extra: item.is_quote_status && {
|
||||
quote: {
|
||||
url: `https://twitter.com/${item.quoted_status.user?.screen_name}/status/${item.quoted_status.id_str}`,
|
||||
content_html: quote,
|
||||
},
|
||||
},
|
||||
_extra:
|
||||
(isRetweet && {
|
||||
links: [
|
||||
{
|
||||
type: 'repost',
|
||||
},
|
||||
],
|
||||
}) ||
|
||||
(item.is_quote_status && {
|
||||
links: [
|
||||
{
|
||||
url: `https://twitter.com/${item.quoted_status.user?.screen_name}/status/${item.quoted_status.id_str}`,
|
||||
content_html: quote,
|
||||
type: 'quote',
|
||||
},
|
||||
],
|
||||
}) ||
|
||||
(item.in_reply_to_screen_name &&
|
||||
item.in_reply_to_status_id_str && {
|
||||
links: [
|
||||
{
|
||||
url: `https://twitter.com/${item.in_reply_to_screen_name}/status/${item.in_reply_to_status_id_str}`,
|
||||
type: 'reply',
|
||||
},
|
||||
],
|
||||
}),
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user