diff --git a/roomserver/inthttp/client.go b/roomserver/inthttp/client.go index e9387bd97..a1dfc6aac 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(