recurse to filter boosts in FanoutTimelineEndpointService filters

This commit is contained in:
Hazelnoot 2025-08-11 16:23:58 -04:00
parent 06e944e666
commit 24e1294a70

View file

@ -205,6 +205,22 @@ export class FanoutTimelineEndpointService {
};
}
// This one MUST be last!
{
const parentFilter = filter;
filter = (note) => {
// If this is a boost, then first run all checks for the boost target.
if (isPureRenote(note) && note.renote) {
if (!parentFilter(note.renote)) {
return false;
}
}
// Either way, make sure to run the checks for the actual note too!
return parentFilter(note);
};
}
const redisTimeline: MiNote[] = [];
let readFromRedis = 0;
let lastSuccessfulRate = 1; // rateをキャッシュする