Merge pull request #1929 from matrix-org/erikj/context_fix
Fix /context/ visibiltiy rulespull/1930/head
commit
b5c268738b
|
@ -356,7 +356,7 @@ class RoomCreationHandler(BaseHandler):
|
|||
|
||||
class RoomContextHandler(BaseHandler):
|
||||
@defer.inlineCallbacks
|
||||
def get_event_context(self, user, room_id, event_id, limit, is_guest):
|
||||
def get_event_context(self, user, room_id, event_id, limit):
|
||||
"""Retrieves events, pagination tokens and state around a given event
|
||||
in a room.
|
||||
|
||||
|
@ -375,12 +375,15 @@ class RoomContextHandler(BaseHandler):
|
|||
|
||||
now_token = yield self.hs.get_event_sources().get_current_token()
|
||||
|
||||
users = yield self.store.get_users_in_room(room_id)
|
||||
is_peeking = user.to_string() not in users
|
||||
|
||||
def filter_evts(events):
|
||||
return filter_events_for_client(
|
||||
self.store,
|
||||
user.to_string(),
|
||||
events,
|
||||
is_peeking=is_guest
|
||||
is_peeking=is_peeking
|
||||
)
|
||||
|
||||
event = yield self.store.get_event(event_id, get_prev_content=True,
|
||||
|
|
|
@ -505,7 +505,6 @@ class RoomEventContext(ClientV1RestServlet):
|
|||
room_id,
|
||||
event_id,
|
||||
limit,
|
||||
requester.is_guest,
|
||||
)
|
||||
|
||||
if not results:
|
||||
|
|
Loading…
Reference in New Issue