feat: add content_html for reply extra data

This commit is contained in:
DIYgod
2023-02-01 09:42:30 +00:00
parent 4e8a3bb3d8
commit b36dd844dd

View File

@@ -140,9 +140,11 @@ module.exports = async (ctx, next) => {
item.description = $('body').html() + '' + (config.suffix || ''); item.description = $('body').html() + '' + (config.suffix || '');
const quote = item._extra?.links?.find((e) => e.type === 'quote'); if (item._extra?.links && $('.rsshub-quote').length) {
if (quote && $('.rsshub-quote').length) { item._extra?.links?.map((e) => {
quote.content_html = $.html($('.rsshub-quote')); e.content_html = $.html($('.rsshub-quote'));
return e;
});
} }
} }
return item; return item;