fix(subscriptions): filter followed discussions when searching (#3376)

Fixes #3375
This commit is contained in:
David Sevilla Martin 2022-04-03 17:14:56 -04:00 committed by GitHub
parent cf8359daa4
commit cd8ed6cf66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,13 @@ export default function addSubscriptionFilter() {
extend(DiscussionListState.prototype, 'requestParams', function (params) {
if (this.params.onFollowing) {
params.filter.subscription = 'following';
params.filter ||= {};
if (params.filter.q) {
params.filter.q += ' is:following';
} else {
params.filter.subscription = 'following';
}
}
});
}