Make sure PDUs and EDUs in transaction don't marshal to null

This commit is contained in:
Neil Alexander 2020-02-28 14:37:18 +00:00
parent 0352f250b8
commit 32ab5aa94d

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