mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-13 06:42:46 +00:00
Restore the room version cache in the roomserver internal API HTTP client
This commit is contained in:
parent
05cafbd197
commit
a01af55ec6
1 changed files with 5 additions and 1 deletions
|
@ -425,10 +425,14 @@ func (h *httpRoomserverInternalAPI) QueryRoomVersionForRoom(
|
||||||
response.RoomVersion = roomVersion
|
response.RoomVersion = roomVersion
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return httputil.CallInternalRPCAPI(
|
err := httputil.CallInternalRPCAPI(
|
||||||
"QueryRoomVersionForRoom", h.roomserverURL+RoomserverQueryRoomVersionForRoomPath,
|
"QueryRoomVersionForRoom", h.roomserverURL+RoomserverQueryRoomVersionForRoomPath,
|
||||||
h.httpClient, ctx, request, response,
|
h.httpClient, ctx, request, response,
|
||||||
)
|
)
|
||||||
|
if err == nil {
|
||||||
|
h.cache.StoreRoomVersion(request.RoomID, response.RoomVersion)
|
||||||
|
}
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *httpRoomserverInternalAPI) QueryCurrentState(
|
func (h *httpRoomserverInternalAPI) QueryCurrentState(
|
||||||
|
|
Loading…
Reference in a new issue