Skip to content

Commit 1e67eed

Browse files
authored
change report polling to read oldest first, so we paginate to end and wait (#353)
1 parent 21aabc8 commit 1e67eed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/report/ReportPoller.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ export class ReportPoller {
6868
response_ = await this.mjolnir.client.doRequest(
6969
"GET",
7070
"/_synapse/admin/v1/event_reports",
71-
{ from: this.from.toString() }
71+
{
72+
// short for direction: forward; i.e. show newest last
73+
dir: "f",
74+
from: this.from.toString()
75+
}
7276
);
7377
} catch (ex) {
7478
await this.mjolnir.logMessage(LogLevel.ERROR, "getAbuseReports", `failed to poll events: ${ex}`);

0 commit comments

Comments
 (0)