fix(route): jike/topic add user name and ID (#9862)

* fix(route): add user name and ID

* fix(route): fix DeepScan warning
This commit is contained in:
Fatpandac
2022-05-31 17:44:21 +08:00
committed by GitHub
parent 6c14613158
commit 4b20e4cd3e

View File

@@ -33,6 +33,14 @@ module.exports = {
// rss内容
let description = '';
// 作者昵称
let author = '';
// 添加内容作者信息
if (item.user) {
author = item.user.screenName;
description += `<span>用户昵称:${author} <br> ID${item.user.id}</span><br>`;
}
if (item.linkInfo) {
const linkUrl = item.linkInfo.originalLinkUrl || item.linkInfo.linkUrl;
@@ -132,6 +140,7 @@ module.exports = {
title,
description: description.trim().replace(/\n/g, '<br>'),
pubDate: parseDate(item.createdAt),
author,
link,
};
}),