mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-15 05:32:25 +03:00
refactor: funnel event creation through room versions (#3060)
In preparation of interfacing up the room version value.
This commit is contained in:
parent
72285b2659
commit
71eeccf34a
21 changed files with 41 additions and 35 deletions
|
@ -137,7 +137,7 @@ func (t *TxnReq) ProcessTransaction(ctx context.Context) (*fclient.RespSend, *ut
|
|||
continue
|
||||
}
|
||||
roomVersion := getRoomVersion(header.RoomID)
|
||||
event, err := gomatrixserverlib.NewEventFromUntrustedJSON(pdu, roomVersion)
|
||||
event, err := roomVersion.NewEventFromUntrustedJSON(pdu)
|
||||
if err != nil {
|
||||
if _, ok := err.(gomatrixserverlib.BadJSONError); ok {
|
||||
// Room version 6 states that homeservers should strictly enforce canonical JSON
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue