fix: include shared rooms to search (#558)

* include shared rooms to search

* tests vibe

* tests vibe

* tests vibe

* tests vibe

* tests vibe

* tests vibe

* tests vibe

* remove tests, thats too much
This commit is contained in:
Igor Loskutov
2025-08-21 14:52:29 -04:00
committed by GitHub
parent bc5b351d2b
commit d70beee51b
3 changed files with 28 additions and 11 deletions

View File

@@ -379,7 +379,13 @@ class SearchController:
)
if params.user_id:
base_query = base_query.where(transcripts.c.user_id == params.user_id)
base_query = base_query.where(
sqlalchemy.or_(
transcripts.c.user_id == params.user_id, rooms.c.is_shared
)
)
else:
base_query = base_query.where(rooms.c.is_shared)
if params.room_id:
base_query = base_query.where(transcripts.c.room_id == params.room_id)
if params.source_kind: