mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 05:12:46 +00:00
Unmarshal events at the Dendrite level not GMSL level (#2164)
* Use new event json types in gmsl * Fix EventJSON to actually unmarshal events * Update GMSL * Bump GMSL and improve error messages * Send back the correct RespState * Update GMSL
This commit is contained in:
parent
cc688a9a38
commit
aa5c3b88de
15 changed files with 158 additions and 107 deletions
|
@ -51,7 +51,7 @@ func SendEventWithState(
|
|||
state *gomatrixserverlib.RespState, event *gomatrixserverlib.HeaderedEvent,
|
||||
origin gomatrixserverlib.ServerName, haveEventIDs map[string]bool, async bool,
|
||||
) error {
|
||||
outliers, err := state.Events()
|
||||
outliers, err := state.Events(event.RoomVersion)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -68,9 +68,10 @@ func SendEventWithState(
|
|||
})
|
||||
}
|
||||
|
||||
stateEventIDs := make([]string, len(state.StateEvents))
|
||||
for i := range state.StateEvents {
|
||||
stateEventIDs[i] = state.StateEvents[i].EventID()
|
||||
stateEvents := state.StateEvents.UntrustedEvents(event.RoomVersion)
|
||||
stateEventIDs := make([]string, len(stateEvents))
|
||||
for i := range stateEvents {
|
||||
stateEventIDs[i] = stateEvents[i].EventID()
|
||||
}
|
||||
|
||||
ires = append(ires, InputRoomEvent{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue