diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-08-11 17:34:09 +0100 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-08-11 17:34:09 +0100 |
commit | a01af55ec694f33d68ecf5e2dc6cfc3e4ff3c2b9 (patch) | |
tree | f35036369420435978c2a4a8e50dd21e5a651817 /roomserver | |
parent | 05cafbd197c99c0e116c9b61447e70ba5af992a3 (diff) |
Restore the room version cache in the roomserver internal API HTTP client
Diffstat (limited to 'roomserver')
-rw-r--r-- | roomserver/inthttp/client.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/roomserver/inthttp/client.go b/roomserver/inthttp/client.go index e9387bd9..a1dfc6aa 100644 --- a/roomserver/inthttp/client.go +++ b/roomserver/inthttp/client.go @@ -425,10 +425,14 @@ func (h *httpRoomserverInternalAPI) QueryRoomVersionForRoom( response.RoomVersion = roomVersion return nil } - return httputil.CallInternalRPCAPI( + err := httputil.CallInternalRPCAPI( "QueryRoomVersionForRoom", h.roomserverURL+RoomserverQueryRoomVersionForRoomPath, h.httpClient, ctx, request, response, ) + if err == nil { + h.cache.StoreRoomVersion(request.RoomID, response.RoomVersion) + } + return err } func (h *httpRoomserverInternalAPI) QueryCurrentState( |