Filter events to only thsoe that the user is allowed to see

This commit is contained in:
Erik Johnston 2015-10-12 15:52:55 +01:00
parent f6fde343a1
commit ca53ad7425
2 changed files with 17 additions and 13 deletions

View file

@ -70,11 +70,11 @@ class SearchStore(SQLBaseStore):
for ev in events
}
defer.returnValue([
defer.returnValue((
{
"rank": r["rank"],
"result": event_map[r["event_id"]]
}
for r in results
if r["event_id"] in event_map
])
r["event_id"]: r["rank"]
for r in results
if r["event_id"] in event_map
},
event_map
))