mirror of
https://github.com/flarum/core.git
synced 2025-08-04 15:37:51 +02:00
fix(subscriptions): filter followed discussions when searching (#3376)
Fixes #3375
This commit is contained in:
committed by
GitHub
parent
cf8359daa4
commit
cd8ed6cf66
@@ -38,7 +38,13 @@ export default function addSubscriptionFilter() {
|
|||||||
|
|
||||||
extend(DiscussionListState.prototype, 'requestParams', function (params) {
|
extend(DiscussionListState.prototype, 'requestParams', function (params) {
|
||||||
if (this.params.onFollowing) {
|
if (this.params.onFollowing) {
|
||||||
params.filter.subscription = 'following';
|
params.filter ||= {};
|
||||||
|
|
||||||
|
if (params.filter.q) {
|
||||||
|
params.filter.q += ' is:following';
|
||||||
|
} else {
|
||||||
|
params.filter.subscription = 'following';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user