change report polling to read oldest first, so we paginate to end and wait

This commit is contained in:
jesopo 2022-08-15 13:55:18 +00:00
parent 21aabc879a
commit 210e52b7b6

View File

@ -68,7 +68,11 @@ export class ReportPoller {
response_ = await this.mjolnir.client.doRequest(
"GET",
"/_synapse/admin/v1/event_reports",
{ from: this.from.toString() }
{
// short for direction: forward; i.e. show newest last
dir: "f",
from: this.from.toString()
}
);
} catch (ex) {
await this.mjolnir.logMessage(LogLevel.ERROR, "getAbuseReports", `failed to poll events: ${ex}`);