Send client events to appservices (#1603)

* Send client events to appservices

* FormatSync instead of FormatAll
This commit is contained in:
Neil Alexander 2020-12-02 15:14:12 +00:00 committed by GitHub
parent bdf6490375
commit 417c7d3569
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 9 deletions

View file

@ -185,14 +185,14 @@ func createTransaction(
}
}
var ev []*gomatrixserverlib.Event
for _, e := range events {
ev = append(ev, e.Event)
var ev []*gomatrixserverlib.HeaderedEvent
for i := range events {
ev = append(ev, &events[i])
}
// Create a transaction and store the events inside
transaction := gomatrixserverlib.ApplicationServiceTransaction{
Events: ev,
Events: gomatrixserverlib.HeaderedToClientEvents(ev, gomatrixserverlib.FormatAll),
}
transactionJSON, err = json.Marshal(transaction)