aboutsummaryrefslogtreecommitdiff
path: root/federationapi
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2023-04-24 11:50:37 +0100
committerGitHub <noreply@github.com>2023-04-24 11:50:37 +0100
commit4679098a6415ea8bfb7728ddafa587780849c059 (patch)
tree3d79888665972179fcb778f7a5f550f5c5b9d410 /federationapi
parent1647213facae52e2c8889fbc848ffc5d3a5792f0 (diff)
Use IRoomVersion (#3064)
This is a step towards allowing arbitrary room version impls.
Diffstat (limited to 'federationapi')
-rw-r--r--federationapi/routing/invite.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/federationapi/routing/invite.go b/federationapi/routing/invite.go
index b13e59f0..88071892 100644
--- a/federationapi/routing/invite.go
+++ b/federationapi/routing/invite.go
@@ -77,6 +77,7 @@ func InviteV1(
) util.JSONResponse {
roomVer := gomatrixserverlib.RoomVersionV1
body := request.Content()
+ // roomVer is hardcoded to v1 so we know we won't panic on Must
event, err := gomatrixserverlib.MustGetRoomVersion(roomVer).NewEventFromTrustedJSON(body, false)
switch err.(type) {
case gomatrixserverlib.BadJSONError: