This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -159,15 +159,16 @@ async def get_event(
159
159
Returns:
160
160
An event, or None if there is no event matching this ID.
161
161
Raises:
162
- SynapseError if there was a problem retrieving this event, or
163
- AuthError if the user does not have the rights to inspect this
164
- event.
162
+ AuthError: if the user does not have the rights to inspect this event.
165
163
"""
166
164
redact_behaviour = (
167
165
EventRedactBehaviour .as_is if show_redacted else EventRedactBehaviour .redact
168
166
)
169
167
event = await self .store .get_event (
170
- event_id , check_room_id = room_id , redact_behaviour = redact_behaviour
168
+ event_id ,
169
+ check_room_id = room_id ,
170
+ redact_behaviour = redact_behaviour ,
171
+ allow_none = True ,
171
172
)
172
173
173
174
if not event :
Original file line number Diff line number Diff line change @@ -84,6 +84,11 @@ def test_cannot_report_nonexistent_event(self) -> None:
84
84
access_token = self .other_user_tok ,
85
85
)
86
86
self .assertEqual (404 , channel .code , msg = channel .result ["body" ])
87
+ self .assertEqual (
88
+ "Unable to report event: it does not exist or you aren't able to see it." ,
89
+ channel .json_body ["error" ],
90
+ msg = channel .result ["body" ],
91
+ )
87
92
88
93
def _assert_status (self , response_status : int , data : JsonDict ) -> None :
89
94
channel = self .make_request (
You can’t perform that action at this time.
0 commit comments