Include room ID in the txnid payload

This commit is contained in:
David Robertson 2023-07-25 18:44:48 +01:00
parent 99d042e6cb
commit 4a6623ff77
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD
2 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,8 @@ func (*V2Accumulate) Type() string { return "V2Accumulate" }
// (the "all-clear").
type V2TransactionID struct {
EventID string
UserID string
RoomID string
UserID string // of the sender
DeviceID string
TransactionID string // Note: an empty transaction ID represents the all-clear.
NID int64

View File

@ -313,6 +313,7 @@ func (h *Handler) Accumulate(ctx context.Context, userID, deviceID, roomID, prev
h.pMap.SeenTxnID(eventID)
h.v2Pub.Notify(pubsub.ChanV2, &pubsub.V2TransactionID{
EventID: eventID,
RoomID: roomID,
UserID: userID,
DeviceID: deviceID,
TransactionID: txnID,
@ -323,6 +324,7 @@ func (h *Handler) Accumulate(ctx context.Context, userID, deviceID, roomID, prev
if allClear {
h.v2Pub.Notify(pubsub.ChanV2, &pubsub.V2TransactionID{
EventID: eventID,
RoomID: roomID,
UserID: userID,
DeviceID: deviceID,
TransactionID: "",