mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 22:02:46 +00:00
Implement ExtraPublicRoomsProvider for p2p demos (#1180)
* Change API and rename to ExtraPublicRoomsProvider * Make dendritejs work again * Maybe make libp2p demo work again * Linting
This commit is contained in:
parent
1773fd84b7
commit
6c4b8185d7
12 changed files with 433 additions and 250 deletions
|
@ -61,7 +61,7 @@ func Setup(
|
|||
transactionsCache *transactions.Cache,
|
||||
federationSender federationSenderAPI.FederationSenderInternalAPI,
|
||||
stateAPI currentstateAPI.CurrentStateInternalAPI,
|
||||
extRoomsProvider api.ExternalPublicRoomsProvider,
|
||||
extRoomsProvider api.ExtraPublicRoomsProvider,
|
||||
) {
|
||||
|
||||
publicAPIMux.Handle("/client/versions",
|
||||
|
@ -313,11 +313,7 @@ func Setup(
|
|||
).Methods(http.MethodPut, http.MethodOptions)
|
||||
r0mux.Handle("/publicRooms",
|
||||
httputil.MakeExternalAPI("public_rooms", func(req *http.Request) util.JSONResponse {
|
||||
/* TODO:
|
||||
if extRoomsProvider != nil {
|
||||
return GetPostPublicRoomsWithExternal(req, stateAPI, fedClient, extRoomsProvider)
|
||||
} */
|
||||
return GetPostPublicRooms(req, rsAPI, stateAPI)
|
||||
return GetPostPublicRooms(req, rsAPI, stateAPI, extRoomsProvider)
|
||||
}),
|
||||
).Methods(http.MethodGet, http.MethodPost, http.MethodOptions)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue