feat: respect history visibility
This commit is contained in:
parent
2a16a5e967
commit
10fa686c77
8 changed files with 166 additions and 98 deletions
src/api/client_server
|
@ -87,6 +87,13 @@ pub async fn search_events_route(
|
|||
.timeline
|
||||
.get_pdu_from_id(result)
|
||||
.ok()?
|
||||
.filter(|pdu| {
|
||||
services()
|
||||
.rooms
|
||||
.state_accessor
|
||||
.user_can_see_event(sender_user, &pdu.room_id, &pdu.event_id)
|
||||
.unwrap_or(false)
|
||||
})
|
||||
.map(|pdu| pdu.to_room_event())
|
||||
})
|
||||
.map(|result| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue