Commit graph

1279 commits

Author SHA1 Message Date
Till Faelligen 02a11d5a8f Only apply receipts on initial sync or if edu positions differ,
otherwise we'll be sending the same receipts over and over again.
2020-10-20 11:01:07 +02:00
Till Faelligen 3a5c8256df Use key/value directly 2020-10-20 09:23:23 +02:00
Till Faelligen 80f346d70a Remove single purpose struct 2020-10-20 09:08:20 +02:00
Till Faelligen 72c0134e99 Merge branch 'master' of https://github.com/matrix-org/dendrite into add-receipts-2 2020-10-20 08:07:11 +02:00
Till Faelligen 72f71f1466 Fix postgres query... 2020-10-20 08:05:37 +02:00
Neil Alexander c7bf122a26
Update sytest lists 2020-10-19 15:38:42 +01:00
Neil Alexander 5d80ff11a0
Update sytest-whitelist 2020-10-19 15:17:28 +01:00
Devon Johnson 45abdcaeb9
Send state after event, not current
Signed-off-by: Devon Johnson <djohnson1865@gmail.com>
2020-10-19 15:12:37 +01:00
Neil Alexander 6e63df1d9a
KindOld (#1531)
* Add KindOld

* Don't process latest events/memberships for old events

* Allow federationsender to ignore duplicate key entries when LatestEventIDs is duplicated by RS output events

* Signal to downstream components if an event has become a forward extremity

* Don't exclude from sync

* Soft-fail checks on KindNew

* Don't run the latest events updater at all for KindOld

* Don't make federation sender change after all

* Kind in federation sender join

* Don't send isForwardExtremity

* Fix syncapi

* Update comments

* Fix SendEventWithState

* Update sytest-whitelist

* Generate old output events

* Sync API consumes old room events

* Update comments
2020-10-19 14:59:13 +01:00
S7evinK 0974f6e2c0
Fix internal http api (#1535)
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2020-10-19 09:38:10 +01:00
Till Faelligen 9e3dff34fb Remove dead code
Use key for timestamp
2020-10-18 11:30:29 +02:00
Till Faelligen 1a10566f28 - Fix a bug when creating client receipts
- Use concrete types instead of interface{}
2020-10-18 11:19:47 +02:00
Till Faelligen 247da6d862 Clarification on comment 2020-10-17 17:17:20 +02:00
Till Faelligen cbc62d176b Ensure required sequence exists before running migrations 2020-10-17 17:15:36 +02:00
Till Faelligen 722fe5a046 Add postgres migration 2020-10-17 15:15:35 +02:00
Till Faelligen d113b03f64 Add sqlite3 migration 2020-10-17 15:15:21 +02:00
Till Faelligen c51dcc25b6 Update gomatrixserverlib 2020-10-17 13:50:40 +02:00
Till Faelligen 4882292791 Merge branch 'master' of https://github.com/matrix-org/dendrite into add-receipts-2 2020-10-17 13:48:40 +02:00
Till Faelligen 2f1d2f53b7 Query all joined rooms instead of just one 2020-10-17 13:47:42 +02:00
Till Faelligen 9d480d58c9 Better creation/usage of JoinResponse 2020-10-16 19:10:07 +02:00
Neil Alexander 640e8c50ec
Take write lock for rate limit map (#1532)
* Take write lock for rate limit map

* Fix potential race condition
2020-10-16 15:44:39 +01:00
Till Faelligen c428d52652 - Use OutputReceiptEvent instead of InputReceiptEvent as result
- Don't use the errors package for errors
- Defer CloseAndLogIfError to close rows
- Fix Copyright
2020-10-16 16:16:44 +02:00
Till Faelligen 27eac8f915 Return a better error message 2020-10-16 16:13:14 +02:00
Till Faelligen b922e56343 - Add TODO for batching requests
- Rename variable
2020-10-16 15:39:38 +02:00
Till Faelligen 3796b22423 Don't use errors package 2020-10-16 15:35:50 +02:00
Till Faelligen d68a20c3a6 Merge branch 'master' of https://github.com/matrix-org/dendrite into add-receipts-2 2020-10-15 21:20:50 +02:00
Till Faelligen b4ba0be6ba Make "Inbound federation rejects receipts from wrong remote" pass 2020-10-15 21:18:18 +02:00
Kegsay 4a7fb9c045
Automatically upgrade databases on startup (#1529)
* Support auto-upgrading accounts DB

* Auto-upgrade device DB deltas

* Support up/downgrading from cmd/goose

* Linting

* Create tables then do migrations then prepare statements

To avoid failing due to some things not existing

* Linting
2020-10-15 18:09:41 +01:00
Till Faelligen dee77b638a Make outbound federation receipts pass 2020-10-15 18:40:25 +02:00
Till Faelligen 4917cee11c Fix column count error 2020-10-15 17:43:44 +02:00
Neil Alexander 3e5d38e284
Improve state resolution v2 performance (matrix-org/gomatrixserverlib#237) 2020-10-15 16:20:19 +01:00
Till Faelligen 6f6a2c1b2d Fix copy & paste error 2020-10-15 16:41:29 +02:00
Till Faelligen bc528bf48f Add passing tests to whitelist
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2020-10-15 16:12:22 +02:00
Till Faelligen 0b5801af3e Merge branch 'master' of https://github.com/matrix-org/dendrite into add-receipts-2 2020-10-15 15:39:54 +02:00
Till Faelligen 24cd35c8ca Add missing kafka config 2020-10-15 15:37:13 +02:00
Till Faelligen 59bec69bf9 Add eduserver kafka consumer 2020-10-15 15:36:55 +02:00
Till Faelligen 26d0d0e1bc Add receipts endpoint 2020-10-15 15:36:02 +02:00
Neil Alexander e154c45b51
Better logging around db.StoreEvent 2020-10-15 14:14:17 +01:00
Neil Alexander 49abe359e6
Start Kafka connections for each component that needs them (#1527)
* Start Kafka connection for each component that needs one

* Fix roomserver unit tests

* Rename to naffkaInstance (@Kegsay review comment)

* Fix import cycle
2020-10-15 13:27:13 +01:00
Till Faelligen 96131fa739 Add receipts api to the eduserver 2020-10-15 13:36:05 +02:00
Till Faelligen dda8095f81 Make receipt json creation "easier" to read 2020-10-15 13:26:34 +02:00
Neil Alexander 10f1beb0de
Don't re-run state resolution on a single trusted state snapshot (#1526)
* Don't re-run state resolution on a single trusted state snapshot

* Lint

* Check if backward extremity is create event before checking missing state
2020-10-15 12:08:49 +01:00
Till Faelligen 5f9ac44062 Add required method to testEDUProducer 2020-10-15 09:54:33 +02:00
Till Faelligen fe418f2fc8 Use StreamingToken as the since value 2020-10-15 09:52:10 +02:00
Till Faelligen ceb7ca7c7d Add receipts table to syncapi 2020-10-14 21:49:41 +02:00
Kegsay e3c2b081c7
txn nil guard when rolling back LatestEventsUpdater (#1524)
* txn nil guard when rolling back LatestEventsUpdater

* Spell lint correctly
2020-10-14 17:05:09 +01:00
Neil Alexander 6f12b8f85c
Ignore typing events where sender doesn't match origin (#1523)
* Ignore typing notifications where the sender doesn't match the origin

* Update sytest-whitelist

* Fix formatting directives
2020-10-14 16:49:25 +01:00
Neil Alexander e3a3908654
Update sytest-whitelist (closes #1315) 2020-10-14 16:07:15 +01:00
Neil Alexander 8d9ecb3996
Ignore duplicate redaction entries (#1522) 2020-10-14 15:24:43 +01:00
Till Faelligen 6998c8248e fix conversion from int to string yields a string of one rune, not a string of digits 2020-10-14 15:27:40 +02:00