aboutsummaryrefslogtreecommitdiff
path: root/roomserver/query/query.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-03-16 16:05:29 +0000
committerGitHub <noreply@github.com>2020-03-16 16:05:29 +0000
commit452f393dd7de5203c5cd3ebe5697af6ea0f4b009 (patch)
treebe995775e8e8b424ff6fa6ff6a06025504d95870 /roomserver/query/query.go
parentdfd8b93d93a586f0c4400b3a317c978a1c0e04d9 (diff)
Update room version descriptors, add error handling (#906)
* Update room version descriptors, add error handling * Fix database queries * Drop Get from version package * Fix database wrapping, add comments for version descriptions * Don't set default room_version value in SQL
Diffstat (limited to 'roomserver/query/query.go')
-rw-r--r--roomserver/query/query.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/roomserver/query/query.go b/roomserver/query/query.go
index f138686b..83f89777 100644
--- a/roomserver/query/query.go
+++ b/roomserver/query/query.go
@@ -20,7 +20,6 @@ import (
"context"
"encoding/json"
"net/http"
- "strconv"
"github.com/matrix-org/dendrite/common"
"github.com/matrix-org/dendrite/roomserver/api"
@@ -733,10 +732,10 @@ func (r *RoomserverQueryAPI) QueryRoomVersionCapabilities(
request *api.QueryRoomVersionCapabilitiesRequest,
response *api.QueryRoomVersionCapabilitiesResponse,
) error {
- response.DefaultRoomVersion = strconv.Itoa(int(version.GetDefaultRoomVersion()))
+ response.DefaultRoomVersion = string(version.DefaultRoomVersion())
response.AvailableRoomVersions = make(map[string]string)
- for v, desc := range version.GetSupportedRoomVersions() {
- sv := strconv.Itoa(int(v))
+ for v, desc := range version.SupportedRoomVersions() {
+ sv := string(v)
if desc.Stable {
response.AvailableRoomVersions[sv] = "stable"
} else {