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;
|
let metadata;
|
||||||
try {
|
try {
|
||||||
metadata = await this.#webmentionMetadata.fetch(webmention.source);
|
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) {
|
} catch (err) {
|
||||||
if (!mention) {
|
if (!mention) {
|
||||||
throw err;
|
throw err;
|
||||||
|
Loading…
Reference in New Issue
Block a user