change report polling to read oldest first, so we paginate to end and wait (#353)

This commit is contained in:
Jess Porter 2022-08-15 15:58:25 +01:00 committed by GitHub
parent 21aabc879a
commit 1e67eed30b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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}`);