mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52:46 +00:00
Yggdrasil demo initial public room directory (#1181)
* Don't return null to public directory request * Initial support for finding public rooms in Yggdrasil demo (incomplete) * Increase QUIC idle time to 15 minutes
This commit is contained in:
parent
3797c38ec8
commit
3a28ddfb7a
7 changed files with 165 additions and 17 deletions
|
@ -71,7 +71,9 @@ func publicRooms(ctx context.Context, request PublicRoomReq, rsAPI roomserverAPI
|
|||
stateAPI currentstateAPI.CurrentStateInternalAPI, extRoomsProvider api.ExtraPublicRoomsProvider,
|
||||
) (*gomatrixserverlib.RespPublicRooms, error) {
|
||||
|
||||
var response gomatrixserverlib.RespPublicRooms
|
||||
response := gomatrixserverlib.RespPublicRooms{
|
||||
Chunk: []gomatrixserverlib.PublicRoom{},
|
||||
}
|
||||
var limit int16
|
||||
var offset int64
|
||||
limit = request.Limit
|
||||
|
@ -103,7 +105,9 @@ func publicRooms(ctx context.Context, request PublicRoomReq, rsAPI roomserverAPI
|
|||
if next >= 0 {
|
||||
response.NextBatch = "T" + strconv.Itoa(next)
|
||||
}
|
||||
response.Chunk = chunk
|
||||
if chunk != nil {
|
||||
response.Chunk = chunk
|
||||
}
|
||||
return &response, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue