Skip to content

Conversation

H-Shay
Copy link
Contributor

@H-Shay H-Shay commented Sep 23, 2025

Adds an endpoint to allow server admins to fetch an event regardless of their membership in the originating room.

@H-Shay H-Shay requested a review from a team as a code owner September 23, 2025 19:13
@github-actions github-actions bot deployed to PR Documentation Preview September 23, 2025 19:14 Active
@github-actions github-actions bot deployed to PR Documentation Preview September 23, 2025 19:18 Active
@github-actions github-actions bot deployed to PR Documentation Preview September 23, 2025 19:26 Active
@github-actions github-actions bot deployed to PR Documentation Preview September 23, 2025 19:38 Active
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor points, looks fine overall though :)

Response:
```json
{
"event_id": "$hbFTSxFNaPau73B8fqGTFrkSqxOpaFjlnzOFEPw9tMA",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this to match some other response format, or is it just redundant? (You already needed to know the event ID to query this API, also I think it may even feature within the event itself)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not to matching anything, the event id wasn't being returned as part of the event so I changed the serialization of the event to include it and removed from the top of the response.

await assert_requester_is_admin(self._auth, request)

event = await self._store.get_event(
event_id, EventRedactBehaviour.as_is, allow_none=True, allow_rejected=True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to clearly document that we will return rejected events here? (I can see people benefitting from this being said, as well as maybe how you know from the response)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably helpful, and just to double-check - if an event is rejected there should be a rejection_reason in the unsigned field of the event, correct?

@github-actions github-actions bot deployed to PR Documentation Preview September 29, 2025 21:02 Active
@H-Shay H-Shay requested a review from reivilibre September 29, 2025 21:06
@H-Shay
Copy link
Contributor Author

H-Shay commented Sep 29, 2025

pretty sure test failures are flakes, but I can't kick the ci to be sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants