diff --git a/src/github.com/matrix-org/dendrite/syncapi/consumers/roomserver.go b/src/github.com/matrix-org/dendrite/syncapi/consumers/roomserver.go index ca46828f9..7c40247b0 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/consumers/roomserver.go +++ b/src/github.com/matrix-org/dendrite/syncapi/consumers/roomserver.go @@ -262,9 +262,9 @@ func (s *OutputRoomEvent) updateStateEvent(event gomatrixserverlib.Event) (gomat } prev := types.PrevEventRef{ - PrevContent: prevEvent.Content(), - PrevID: prevEvent.EventID(), - PrevSender: prevEvent.Sender(), + PrevContent: prevEvent.Content(), + ReplacesState: prevEvent.EventID(), + PrevSender: prevEvent.Sender(), } return event.SetUnsigned(prev) diff --git a/src/github.com/matrix-org/dendrite/syncapi/types/types.go b/src/github.com/matrix-org/dendrite/syncapi/types/types.go index cf737a408..f710c6d5d 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/types/types.go +++ b/src/github.com/matrix-org/dendrite/syncapi/types/types.go @@ -31,9 +31,9 @@ func (sp StreamPosition) String() string { // PrevEventRef represents a reference to a previous event in a state event upgrade type PrevEventRef struct { - PrevContent json.RawMessage `json:"prev_content"` - PrevID string `json:"replaces_state"` - PrevSender string `json:"prev_sender"` + PrevContent json.RawMessage `json:"prev_content"` + ReplacesState string `json:"replaces_state"` + PrevSender string `json:"prev_sender"` } // Response represents a /sync API response. See https://matrix.org/docs/spec/client_server/r0.2.0.html#get-matrix-client-r0-sync