mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
switch to using event context api
This commit is contained in:
parent
3c128bfeaf
commit
7dd98c0b98
@ -61,9 +61,12 @@ export class ReportPoll {
|
|||||||
|
|
||||||
const response = response_!;
|
const response = response_!;
|
||||||
for (let report of response.event_reports) {
|
for (let report of response.event_reports) {
|
||||||
let event: any; // `any` because `getEvent` and `handleServerAbuseReport` also use `any`
|
let event: any; // `any` because `handleServerAbuseReport` uses `any`
|
||||||
try {
|
try {
|
||||||
event = await this.mjolnir.client.getEvent(report.room_id, report.event_id);
|
event = (await this.mjolnir.client.doRequest(
|
||||||
|
"GET",
|
||||||
|
`/_synapse/admin/v1/rooms/${report.room_id}/context/${report.event_id}?limit=1`
|
||||||
|
)).event;
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user