0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-25 19:03:49 +01:00
dendrite/appservice
Tak Wai Wong 99f6b6a952
Bug fix #2718 appservice txnid should be different for each batch of events (#2719)
See issue: [#2718](https://github.com/matrix-org/dendrite/issues/2718)
for more details.

The fix assumes that if the number of transaction items are different,
then the txnid should be different.

txnid := OriginalServerTS()_len(transactions) 

The case that it doesn't address is if the txnid generated this way is
the same for 2 different batches of events which have the same
OriginalServerTS and the same array length.

Another option:

txnid := OriginalServerTS()_hash(transactions)

Would love to hear other ideas and ways to fix this.

### Pull Request Checklist

* [x ] I have added added tests for PR _or_ I have justified why this PR
doesn't need tests.
* [x ] Pull request includes a [sign
off](https://github.com/matrix-org/dendrite/blob/main/docs/CONTRIBUTING.md#sign-off)

Signed-off-by: `Tak Wai Wong <tak@hntlabs.com>`

Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
2022-09-19 18:39:06 +02:00
..
api Clean up interface definitions (#2427) 2022-05-06 12:39:26 +01:00
consumers Bug fix #2718 appservice txnid should be different for each batch of events (#2719) 2022-09-19 18:39:06 +02:00
inthttp Generic-based internal HTTP API (#2626) 2022-08-11 15:29:33 +01:00
query Refactor appservices component (#2687) 2022-09-01 09:20:40 +01:00
appservice.go Refactor appservices component (#2687) 2022-09-01 09:20:40 +01:00