mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 23:37:43 +03:00
Hid Bridgy Webmentions
fixes https://github.com/TryGhost/Team/issues/2591
This commit is contained in:
parent
bf675e471f
commit
aed10d38f0
@ -30,6 +30,9 @@ export default class MentionsRoute extends AuthenticatedRoute {
|
||||
paginationSettings.filter = `resource_id:${params.post_id}+resource_type:post`;
|
||||
}
|
||||
|
||||
// Filter bridgy mentions
|
||||
// paginationSettings.filter = `${paginationSettings.filter ? (paginationSettings.filter + '+') : ''}source:-~^'https://brid.gy/'`;
|
||||
|
||||
return RSVP.hash({
|
||||
mentions: this.infinity.model('mention', paginationSettings),
|
||||
post: params.post_id ? this.store.findRecord('post', params.post_id) : null
|
||||
|
@ -51,6 +51,10 @@ module.exports = {
|
||||
return require('./webhooks');
|
||||
},
|
||||
|
||||
get mentions() {
|
||||
return require('./mentions');
|
||||
},
|
||||
|
||||
get comments() {
|
||||
return require('./comments');
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
browse(_apiConfig, frame) {
|
||||
// Force source:-~^'https://brid.gy/' to be added to the filter
|
||||
const filterBridgy = `source:-~^'https://brid.gy/'`;
|
||||
if (frame.options.filter) {
|
||||
frame.options.filter = `${frame.options.filter}+${filterBridgy}`;
|
||||
} else {
|
||||
frame.options.filter = filterBridgy;
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user