Emit a User and DeviceID in txn message

This commit is contained in:
David Robertson 2023-06-12 11:52:33 +01:00
parent ff02c4c79a
commit 6a951908af
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD
2 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,8 @@ func (*V2Accumulate) Type() string { return "V2Accumulate" }
// V2TransactionID is emitted by a poller when it sees an event with a transaction ID.
type V2TransactionID struct {
EventID string
UserID string
DeviceID string
TransactionID string
NID int64
}

View File

@ -290,6 +290,8 @@ func (h *Handler) Accumulate(ctx context.Context, userID, deviceID, roomID, prev
h.v2Pub.Notify(pubsub.ChanV2, &pubsub.V2TransactionID{
EventID: eventID,
UserID: userID,
DeviceID: deviceID,
TransactionID: txnID,
NID: nid,
})