mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Fix GET /directory/list/room/{roomID}
(#2262)
* Let's try to work out why this endpoint lies * Try that again * Fix `QueryPublishedRooms` * Remove logging * Remove unnecessary change * Remove unnecessary change
This commit is contained in:
parent
030b995636
commit
089d16812c
3 changed files with 14 additions and 0 deletions
|
@ -610,6 +610,14 @@ func (r *Queryer) QueryPublishedRooms(
|
|||
req *api.QueryPublishedRoomsRequest,
|
||||
res *api.QueryPublishedRoomsResponse,
|
||||
) error {
|
||||
if req.RoomID != "" {
|
||||
visible, err := r.DB.GetPublishedRoom(ctx, req.RoomID)
|
||||
if err == nil && visible {
|
||||
res.RoomIDs = []string{req.RoomID}
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
rooms, err := r.DB.GetPublishedRooms(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue