mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-25 12:34:58 +01:00
Fix missing return values in streaming (#26233)
This commit is contained in:
parent
2eb1a5b7b6
commit
2fc6117d1b
@ -796,12 +796,12 @@ const startWorker = async (workerId) => {
|
|||||||
const filter_results = Object.values(req.cachedFilters).reduce((results, cachedFilter) => {
|
const filter_results = Object.values(req.cachedFilters).reduce((results, cachedFilter) => {
|
||||||
// Check the filter hasn't expired before applying:
|
// Check the filter hasn't expired before applying:
|
||||||
if (cachedFilter.expires_at !== null && cachedFilter.expires_at < now) {
|
if (cachedFilter.expires_at !== null && cachedFilter.expires_at < now) {
|
||||||
return;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Just in-case JSDOM fails to find textContent in searchableContent
|
// Just in-case JSDOM fails to find textContent in searchableContent
|
||||||
if (!searchableTextContent) {
|
if (!searchableTextContent) {
|
||||||
return;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
const keyword_matches = searchableTextContent.match(cachedFilter.regexp);
|
const keyword_matches = searchableTextContent.match(cachedFilter.regexp);
|
||||||
@ -816,6 +816,8 @@ const startWorker = async (workerId) => {
|
|||||||
status_matches: null
|
status_matches: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Send the payload + the FilterResults as the `filtered` property
|
// Send the payload + the FilterResults as the `filtered` property
|
||||||
|
Loading…
Reference in New Issue
Block a user