mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-04 02:58:08 +08:00
fix(route): crossbell replace punycode domain (#11872)
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
module.exports = {
|
||||
getItem: (note) => ({
|
||||
title: note.metadata?.content?.title || '',
|
||||
description: note.metadata?.content?.content,
|
||||
link: note.metadata?.content?.external_urls || `https://crossbell.io/notes/${note.characterId}-${note.noteId}`,
|
||||
pubDate: note.metadata?.content?.publishedAt,
|
||||
updated: note.metadata?.content?.updatedAt,
|
||||
author: note.metadata?.content?.authors?.[0] || note.character?.metadata?.content?.name || note.character?.handle,
|
||||
guid: `${note.characterId}-${note.noteId}`,
|
||||
category: [...(note.metadata?.content?.sources || []), ...(note.metadata?.content?.tags || [])],
|
||||
}),
|
||||
getItem: (note) => {
|
||||
let link = note.metadata?.content?.external_urls?.[0] ?? `https://crossbell.io/notes/${note.characterId}-${note.noteId}`;
|
||||
if (link.startsWith('https://xn--')) {
|
||||
link = `https://crossbell.io/notes/${note.characterId}-${note.noteId}`;
|
||||
}
|
||||
return {
|
||||
title: note.metadata?.content?.title || '',
|
||||
description: note.metadata?.content?.content,
|
||||
link,
|
||||
pubDate: note.metadata?.content?.publishedAt,
|
||||
updated: note.metadata?.content?.updatedAt,
|
||||
author: note.metadata?.content?.authors?.[0] || note.character?.metadata?.content?.name || note.character?.handle,
|
||||
guid: `https://crossbell.io/notes/${note.characterId}-${note.noteId}`,
|
||||
category: [...(note.metadata?.content?.sources || []), ...(note.metadata?.content?.tags || [])],
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user