Skip to content
Snippets Groups Projects
Commit d4fb1c8a authored by Erik Johnston's avatar Erik Johnston
Browse files

Only hit get_room_events_stream if we have a valid user_id

parent ae493c94
No related branches found
No related tags found
No related merge requests found
......@@ -112,8 +112,11 @@ class StreamStore(SQLBaseStore):
@log_function
def get_room_events(self, user_id, from_key, to_key, room_id, limit=0,
direction='f', with_feedback=False):
# We deal with events request in two different ways depending on if
# this looks like an /events request or a pagination request.
is_events = (
direction == 'f'
and user_id
and is_stream_token(from_key)
and to_key and is_stream_token(to_key)
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment