mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Associate transactions with session IDs instead of device IDs (#789)
This commit is contained in:
parent
5eb63f1d1e
commit
43308d2f3f
9 changed files with 55 additions and 39 deletions
|
@ -893,7 +893,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.UserID == in[i].Sender() && device.ID == in[i].transactionID.DeviceID {
|
||||
if device.UserID == in[i].Sender() && device.SessionID == in[i].transactionID.SessionID {
|
||||
err := out[i].SetUnsignedField(
|
||||
"transaction_id", in[i].transactionID.TransactionID,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue