Added support for updating Mentions when Webmentions are resent
refs https://github.com/TryGhost/Team/issues/2535 At the moment we only update the metadata of the Webmention source, so that we can capture update titles, excerpts, etc... when a post is updated.
This commit is contained in:
parent
78bebc6279
commit
3df19235b0
@ -155,6 +155,16 @@ module.exports = class MentionsAPI {
|
||||
let metadata;
|
||||
try {
|
||||
metadata = await this.#webmentionMetadata.fetch(webmention.source);
|
||||
if (mention) {
|
||||
mention.setSourceMetadata({
|
||||
sourceTitle: metadata.title,
|
||||
sourceSiteTitle: metadata.siteTitle,
|
||||
sourceAuthor: metadata.author,
|
||||
sourceExcerpt: metadata.excerpt,
|
||||
sourceFavicon: metadata.favicon,
|
||||
sourceFeaturedImage: metadata.image
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
if (!mention) {
|
||||
throw err;
|
||||
|
Loading…
Reference in New Issue
Block a user