Make sure PDUs and EDUs in transaction don't marshal to null (#876)

main
Neil Alexander 2020-02-28 14:54:51 +00:00 committed by GitHub
parent 420ee15433
commit 6460b3725d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -102,7 +102,10 @@ func (oq *destinationQueue) next() *gomatrixserverlib.Transaction {
return nil
}
var t gomatrixserverlib.Transaction
t := gomatrixserverlib.Transaction{
PDUs: []gomatrixserverlib.Event{},
EDUs: []gomatrixserverlib.EDU{},
}
now := gomatrixserverlib.AsTimestamp(time.Now())
t.TransactionID = gomatrixserverlib.TransactionID(fmt.Sprintf("%d-%d", now, oq.sentCounter))
t.Origin = oq.origin