Commit graph

1840 commits

Author SHA1 Message Date
Till Faelligen c60422191e Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/phonehomestats 2022-03-03 11:16:41 +01:00
Till Faelligen b4089a34f3 Add total rooms 2022-03-03 11:16:29 +01:00
Till Faelligen dad6289bf3 Add tracing methods 2022-03-03 11:15:08 +01:00
Till Faelligen a60c307be2 Move WASM to its own file, add config and comments 2022-03-03 10:53:31 +01:00
Till Faelligen 8e5f913e0b Add configuration for phone home stats 2022-03-03 10:52:53 +01:00
Neil Alexander 111f01ddc8
Update sytest-whitelist for changes in matrix-org/sytest#1200 2022-03-03 09:18:40 +00:00
Till Faelligen 5ffb386a25 Add version & monolith stats 2022-03-02 17:11:29 +01:00
Till Faelligen e1eaa74f8b Send empty request 2022-03-02 16:41:13 +01:00
Till Faelligen 4e789ab46a Fix queries 2022-03-02 16:31:50 +01:00
Till Faelligen 9f5c963dac add missing files 2022-03-02 16:17:01 +01:00
Till Faelligen 4454d33c34 Add complete config to syncapi 2022-03-02 16:14:43 +01:00
Till Faelligen d7d7919cea testing phone home stats 2022-03-02 16:14:04 +01:00
Till Faelligen 2747c9eae2 sycnapi stats queries 2022-03-02 16:13:46 +01:00
Till Faelligen 9897a6e186 userapi interface and internal api 2022-03-02 16:13:00 +01:00
Till Faelligen a01ebba787 userapi stats tables & queries 2022-03-02 16:12:44 +01:00
Kegan Dougal e46a61c49e Skip flakey test for now 2022-03-02 11:38:13 +00:00
Neil Alexander 8996cc8059
Media endpoints on /v3 (#2242)
* Media endpoints on `/v3`

* Keep `/v1` too?
2022-03-02 11:35:35 +00:00
Till Faelligen 104a0fbf8f Fix queries 2022-03-02 12:04:00 +01:00
Till Faelligen d8611efbd7 Add user_daily_visits table 2022-03-02 11:55:45 +01:00
Kegan Dougal a4c918ee17 Fix data race in unit tests 2022-03-02 10:49:36 +00:00
Neil Alexander 00b3545b14
Update NATS Server to v2.7.3 2022-03-02 10:36:20 +00:00
Till Faelligen 3f0ed455b0 Add userAgent to UpdateDeviceLastSeen
Add new Table for tracking daily user vists
2022-03-02 09:53:49 +01:00
Till Faelligen 9e14e6afe0 Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/phonehomestats 2022-03-02 08:36:49 +01:00
Neil Alexander 849e40d456
Use correct stream provider in Latest for ReceiptPosition 2022-03-01 17:25:26 +00:00
kegsay 23f028cf6e
Add unit test for device list update debouncing (#2220)
* Add unit test for device list update debouncing

* bugfix: actually return stale device lists in the test...

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-01 17:18:06 +00:00
Neil Alexander 8e82739d77
Set max age of 5 minutes for spaces summary cache 2022-03-01 17:01:08 +00:00
Neil Alexander bb2380c254
Allow specifying max age for caches (#2239)
* Allow specifying max age for caches

* Evict cache entry if it's found to be stale when we call Get

* Fix bugs
2022-03-01 16:59:52 +00:00
Neil Alexander 726529fe99
Hopefully fix read receipts (#2241) 2022-03-01 16:59:11 +00:00
S7evinK cda2452ba0
Only allow device deletion from session UIA was initiated from (#2235)
* Only allow device deletion if the session matches

* Make the challenge response available to other packages

* Remove userID, as it's not in the spec

* Remove tests

* Add passing test & remove obsolete config

* Rename field, add comment

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-01 16:39:57 +00:00
kegsay 352e63915f
msc2946: add federation cache (#2238) 2022-03-01 16:32:48 +00:00
kegsay ae840590b6
Make complement go fast (#2240) 2022-03-01 16:03:54 +00:00
Till Faelligen 241f1514b7 Initial phone home stats queries 2022-03-01 15:54:07 +01:00
Kegan Dougal 8dfc958ddd Also don't send null back when the target room isn't a space room 2022-03-01 14:40:55 +00:00
S7evinK af610df85a
Return state on calls to /message and lazy load members (#2218)
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-01 14:39:56 +00:00
Neil Alexander 471fda810a
Remove unnecessary error line (#2237)
Previously this error line would print because we were pulling out all user memberships, but now this is no longer necessary — an event state key that we don't know will no longer get passed to `SelectJoinedUsersSetForRooms` at all.
2022-03-01 14:39:06 +00:00
Kegan Dougal 18e3c40da4 Always send [] from federated rooms, not null 2022-03-01 14:22:59 +00:00
Kegan Dougal 1a79060b46 Bump GMSL version 2022-03-01 14:16:47 +00:00
kegsay f1b92de017
MSC2946: Spaces Summary (round 2) (#2232)
* Initial cut at fixing up MSC2946 to work with latest spec

* bugfix: send response back correctly

* Initial working version of MSC2946

* msc2946: handle suggested_only; remove custom database

As the MSC doesn't require reverse lookups, we can just pull
the room state and inspect via the roomserver database. To
handle this, expand QueryCurrentState to support wildcards.

Use all this and handle `?suggested_only`.

* Sort child rooms

* msc2946: Make TestClientSpacesSummary pass

* msc2946: allow invited rooms to be spidered

* msc2946: support basic federation requests

* fix up go mod
2022-03-01 13:40:07 +00:00
Neil Alexander 530f05885d
Limit JoinedUsersSetInRooms to interested users (#2234)
* Limit database work in `JoinedUsersSetInRooms` to changed user IDs only

* Comments

* Fix variadic params for SQLite, update comments
2022-03-01 13:01:38 +00:00
Neil Alexander 58bf91a585
Check for changes in PerformUploadDeviceKeys (#2233)
* Don't generate key change notifs if nothing changed on cross-signing upload

* Check both directions of changes
2022-03-01 11:00:54 +00:00
Neil Alexander a23fda6626
Update Events call-sites which now don't return an error, update parsedRespState to sort (#2227)
* Topologically sort with `SendEventWithState`, so that earlier events should satisfy auth for later ones

* Revert "Topologically sort with `SendEventWithState`, so that earlier events should satisfy auth for later ones"

This reverts commit b0cd706012.

* Update to matrix-org/gomatrixserverlib#293

* `Events` no longer returns an error, other tweaks

* Make sure `Events` is sorted for `parsedRespState` too
2022-02-28 14:51:40 +00:00
S7evinK ac77732185
Add possibility to reset password using create-account (#2231)
* Add possibility to reset password

* Invalidate logins

* Fix test
2022-02-28 12:57:56 +00:00
Neil Alexander 264165eb8c
Update systemd example to set LimitNOFILE 2022-02-25 17:35:10 +00:00
S7evinK cf27e26712
Remember parameters on registration (#2225)
* Remember parameters for sessions
Cleanup sessions on successfully registering or after a while

* Add flakey test

* Update to use time.AfterFunc, add more tests

* Try to drain the channel, if possible
2022-02-25 14:33:02 +01:00
Neil Alexander 4c07374c42
Reduce allocations significantly in state res v2, which should help to keep memory down when joining rooms too (update to matrix-org/gomatrixserverlib@f6ab9c5) 2022-02-24 17:05:49 +00:00
Neil Alexander 4b01f1cd12
State resolution v2 micro-optimisations (#2226)
* Don't populate duplicates into auth events

* Only append the single event

* Potentially reduce number of iterations in `isInAllAuthLists
2022-02-24 11:09:01 +00:00
Neil Alexander fea8d152e7
Relax roomserver input transactional isolation (#2224)
* Don't force full transactional isolation on roomserver input

* Set succeeded

* Tweak `MissingAuthPrevEvents`
2022-02-23 15:41:32 +00:00
Neil Alexander b8a97b6ee0
Update to matrix-org/pinecone@0f0afd1a46 2022-02-23 10:45:07 +00:00
Neil Alexander 2b0a5adfaf
Version 0.6.4 (#2212)
* Version 0.6.4

* Tweaks

* Update changelog

* Update changelog one last time
2022-02-22 16:55:08 +00:00
S7evinK 41dc651b25
Send device update to local users if remote display name changes (#2215)
* Send device_list update to satisfy sytest

* Fix build issue from merged in change

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-02-22 16:34:53 +00:00