mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-26 11:36:03 +03:00
Only hit get_room_events_stream if we have a valid user_id
This commit is contained in:
parent
ae493c9418
commit
d4fb1c8a92
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue