From 4b20e4cd3ebfdaf8ffa0353ffc1311dffc06f3ea Mon Sep 17 00:00:00 2001
From: Fatpandac <1779196284@qq.com>
Date: Tue, 31 May 2022 17:44:21 +0800
Subject: [PATCH] fix(route): jike/topic add user name and ID (#9862)
* fix(route): add user name and ID
* fix(route): fix DeepScan warning
---
lib/v2/jike/utils.js | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/v2/jike/utils.js b/lib/v2/jike/utils.js
index 0e4cbcef3..f1b8e5136 100644
--- a/lib/v2/jike/utils.js
+++ b/lib/v2/jike/utils.js
@@ -33,6 +33,14 @@ module.exports = {
// rss内容
let description = '';
+ // 作者昵称
+ let author = '';
+
+ // 添加内容作者信息
+ if (item.user) {
+ author = item.user.screenName;
+ description += `用户昵称:${author}
ID:${item.user.id}
`;
+ }
if (item.linkInfo) {
const linkUrl = item.linkInfo.originalLinkUrl || item.linkInfo.linkUrl;
@@ -132,6 +140,7 @@ module.exports = {
title,
description: description.trim().replace(/\n/g, '
'),
pubDate: parseDate(item.createdAt),
+ author,
link,
};
}),