From a5f130c6703196d6acf0e5039923af50ddd4396e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 6 Dec 2017 17:01:51 +0000 Subject: [PATCH] Check that UserID matches too --- .../matrix-org/dendrite/syncapi/storage/syncserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/syncapi/storage/syncserver.go b/src/github.com/matrix-org/dendrite/syncapi/storage/syncserver.go index f5d8f6617..4c2bb4f65 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/storage/syncserver.go +++ b/src/github.com/matrix-org/dendrite/syncapi/storage/syncserver.go @@ -624,7 +624,7 @@ func streamEventsToEvents(device *authtypes.Device, in []streamEvent) []gomatrix for i := 0; i < len(in); i++ { out[i] = in[i].Event if device != nil && in[i].transactionID != nil { - if device.ID == in[i].transactionID.DeviceID { + if device.UserID == in[i].Sender() && device.ID == in[i].transactionID.DeviceID { // TODO: Don't clobber unsigned ev, err := out[i].SetUnsigned(map[string]string{ "transaction_id": in[i].transactionID.TransactionID,