Added support for verified property to BookshelfMentionRepository

refs https://github.com/TryGhost/Team/issues/2549

This ensures we can persist the verification of a Mention to MySQL/SQLite3
This commit is contained in:
Fabien "egg" O'Carroll 2023-02-17 18:42:16 +07:00 committed by Fabien 'egg' O'Carroll
parent 277a563138
commit 37cfb96d9f

View File

@ -54,7 +54,8 @@ module.exports = class BookshelfMentionRepository {
sourceAuthor: model.get('source_author'),
sourceExcerpt: model.get('source_excerpt'),
sourceFavicon: model.get('source_favicon'),
sourceFeaturedImage: model.get('source_featured_image')
sourceFeaturedImage: model.get('source_featured_image'),
verified: model.get('verified')
});
}
@ -107,7 +108,8 @@ module.exports = class BookshelfMentionRepository {
resource_id: mention.resourceId?.toHexString(),
resource_type: mention.resourceId ? 'post' : null,
payload: mention.payload ? JSON.stringify(mention.payload) : null,
deleted: Mention.isDeleted(mention)
deleted: Mention.isDeleted(mention),
verified: mention.verified
};
const existing = await this.#MentionModel.findOne({id: data.id}, {require: false});