Merge pull request #3724 from Half-Shot/hs/guest-fetch-event

Allow guests to use /rooms/:roomId/event/:eventId
This commit is contained in:
Erik Johnston 2018-08-22 13:41:08 +01:00 committed by GitHub
commit db10f553ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/3724.feature Normal file
View File

@ -0,0 +1 @@
Allow guests to use /rooms/:roomId/event/:eventId

View File

@ -531,7 +531,7 @@ class RoomEventServlet(ClientV1RestServlet):
@defer.inlineCallbacks
def on_GET(self, request, room_id, event_id):
requester = yield self.auth.get_user_by_req(request)
requester = yield self.auth.get_user_by_req(request, allow_guest=True)
event = yield self.event_handler.get_event(requester.user, room_id, event_id)
time_now = self.clock.time_msec()