mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 21:12:45 +00:00
Use IRoomVersion (#3064)
This is a step towards allowing arbitrary room version impls.
This commit is contained in:
parent
1647213fac
commit
4679098a64
7 changed files with 25 additions and 20 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue