Commit graph

2229 commits

Author SHA1 Message Date
Neil Alexander a0427c4b09
Merge branch 'main' into s7evink/hisvismessages 2022-08-02 12:49:32 +01:00
Neil Alexander ca3fa58388
Various roominfo tweaks (#2607) 2022-08-02 12:27:15 +01:00
Neil Alexander 7b4a9171ab
Lint 2022-08-02 10:44:44 +01:00
Neil Alexander eab87ef07d
Stronger checks for /send_join (#2604) 2022-08-02 10:22:17 +01:00
Neil Alexander 9295bf0b1f
Merge branch 'main' into s7evink/hisvismessages 2022-08-02 09:53:58 +01:00
sergekh2 6b6b420b9f
Fix issue with sync API not advancing. (#2603)
Issue: During conversation, under some conditions, sync cookie is not advanced, and, as a result, client loops on the same sync API call creating high traffic and CPU load.
Fix: pdu component of cookie was updated incorrectly.
2022-08-02 09:43:48 +01:00
Neil Alexander 3d51624fef
Version 0.9.0 (#2602) 2022-08-01 17:34:29 +01:00
Neil Alexander e94ef84aab
De-race CompleteSync (#2601)
The `err` was coming from outside of the goroutine and being written to by concurrent goroutines.
2022-08-01 15:55:56 +01:00
Neil Alexander 119cde3766
De-race types.RoomInfo (#2600) 2022-08-01 15:29:19 +01:00
Neil Alexander 05c83923e3
Optimise checking other servers allowed to see events (#2596)
* Try optimising checking if server is allowed to see event

* Fix error

* Handle case where snapshot NID is 0

* Fix query

* Update SQL

* Clean up `CheckServerAllowedToSeeEvent`

* Not supported on SQLite

* Maybe placate the unit tests

* Review comments
2022-08-01 14:11:00 +01:00
Till Faelligen 4b922517eb
Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/hisvismessages 2022-08-01 13:08:34 +02:00
Neil Alexander c7f7aec4d0
Set CORS headers for HTTP 404 and 405 errors (#2599)
* Set CORS headers for the 404s

* Use custom handlers, plus one for HTTP 405 too

* Tweak setup

* Add to muxes too

* Tidy up some more

* Use built-in HTTP 404 handler

* Don't bother setting it for federation-facing
2022-08-01 11:34:27 +01:00
Till Faelligen 473a402c1c
Fix unit tests 2022-08-01 12:27:25 +02:00
Till Faelligen 3a006495a9
Move setting history visibility to own migration, be more restrictive 2022-08-01 12:07:38 +02:00
Till Faelligen e84fbf5061
PR peview fixes/changes 2022-08-01 11:13:03 +02:00
Neil Alexander 645f31ae24
Update NATS Server and nats.go to use upstream 2022-08-01 09:51:13 +01:00
Till Faelligen 9a816fb06b
Merge branch 's7evink/hisvismessages' of github.com:matrix-org/dendrite into s7evink/hisvismessages 2022-08-01 07:50:03 +02:00
kegsay a69066ed7c
Merge branch 'main' into s7evink/hisvismessages 2022-07-29 10:53:32 +01:00
Neil Alexander 962b76da44
Make the User API responsible for sending account data output events (#2592)
* Make the User API responsible for sending account data output events

* Clean up producer

* Review comments
2022-07-25 17:30:07 +01:00
Neil Alexander 7490a50a4e
Fix imports 2022-07-25 15:19:42 +01:00
Neil Alexander ab3f8a5cd1
Merge branch 'main' into s7evink/hisvismessages 2022-07-25 15:17:54 +01:00
Neil Alexander 497ab4e1b7
Remove goose from Dockerfiles 2022-07-25 14:46:35 +01:00
Neil Alexander ccea23cd40
Remove room_id field from MSC2946 stripped events (closes #2588) 2022-07-25 11:42:22 +01:00
Jonathan Bartlett b836243a24
Add .well-known/matrix/client to clientapi (#2551)
Signed-off-by: Jonathan Bartlett <jonathan@jonnobrow.co.uk>

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-07-25 10:39:57 +01:00
Till 081f5e7226
Update database migrations, remove goose (#2264)
* Add new db migration

* Update migrations
Remove goose

* Add possibility to test direct upgrades

* Try to fix WASM test

* Add checks for specific migrations

* Remove AddMigration
Use WithTransaction
Add Dendrite version to table

* Fix linter issues

* Update tests

* Update comments, outdent if

* Namespace migrations

* Add direct upgrade tests, skipping over one version

* Split migrations

* Update go version in CI

* Fix copy&paste mistake

* Use contexts in migrations

Co-authored-by: kegsay <kegan@matrix.org>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-07-25 10:39:22 +01:00
Till Faelligen b9263390fa
Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/hisvismessages 2022-07-23 15:24:43 +02:00
Neil Alexander c7d978274d
Try to fix HTTP 500s on /members (#2581) 2022-07-22 19:43:48 +01:00
Till Faelligen 55bf4d3ad7
Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/hisvismessages 2022-07-22 15:47:42 +02:00
Neil Alexander f0c8a03649
Membership updater refactoring (#2541)
* Membership updater refactoring

* Pass in membership state

* Use membership check rather than referring to state directly

* Delete irrelevant membership states

* We don't need the leave event after all

* Tweaks

* Put a log entry in that I might stand a chance of finding

* Be less panicky

* Tweak invite handling

* Don't freak if we can't find the event NID

* Use event NID from `types.Event`

* Clean up

* Better invite handling

* Placate the almighty linter

* Blacklist a Sytest which is otherwise fine under Complement for reasons I don't understand

* Fix the sytest after all (thanks @S7evinK for the spot)
2022-07-22 14:44:04 +01:00
Till Faelligen e30565c029
Try to optimize database requests 2022-07-22 12:27:36 +02:00
dependabot[bot] a201b4400d
Bump tzinfo from 1.2.9 to 1.2.10 in /docs (#2584)
Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 1.2.9 to 1.2.10.
- [Release notes](https://github.com/tzinfo/tzinfo/releases)
- [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md)
- [Commits](https://github.com/tzinfo/tzinfo/compare/v1.2.9...v1.2.10)

---
updated-dependencies:
- dependency-name: tzinfo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-22 10:36:10 +01:00
Till Faelligen 53885048a8
More cleanup 2022-07-22 09:12:01 +02:00
Till Faelligen 17fee30c0e
Remove noise/unneeded code 2022-07-22 09:06:24 +02:00
Till Faelligen 7cd8f40b48
Revert "Move queries to topology table"
This reverts commit 4f0d41be9c.
2022-07-22 08:59:35 +02:00
Till Faelligen bbbf1036b7
Use actual internal rsAPI, default to shared visibility in tests 2022-07-22 08:32:12 +02:00
Till Faelligen 2502e66592
Tweaks and logging 2022-07-22 07:32:29 +02:00
Till Faelligen e24dcaa205
Add method to fetch the membership at a given event 2022-07-22 07:15:34 +02:00
Till Faelligen bde6f67932
Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/hisvismessages 2022-07-21 09:04:06 +02:00
Matt Holt 35ce551c8f
docs: Add build page; correct proxy info; fix Caddy example (#2579)
* Add build page; correct proxy info; fix Caddy example

* Improve Caddyfile example

* Apply review comments; add polylith Caddyfile
2022-07-21 07:08:17 +02:00
Till Faelligen 6d7fd13c82
Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/hisvismessages 2022-07-20 13:18:50 +02:00
Till 9507966ebd
Fix issue with membership event_nid being 0 (#2580) 2022-07-20 12:39:06 +02:00
Tulir Asokan 84a7797883
Explain how SRV works in Matrix and discourage using it (#2577)
* Explain how SRV works in Matrix and discourage using it

* Minor tweaks to formatting

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-07-19 15:19:03 +01:00
Till Faelligen 503afceccb Update migrations to set "correct" history visibility 2022-07-19 13:30:43 +02:00
Neil Alexander 5c01306bb5
Add event state key cache (#2576) 2022-07-19 12:15:48 +01:00
Neil Alexander 583b8ea273
Update FAQ 2022-07-19 11:51:46 +01:00
Till Faelligen 56d8a2371f Remove unused statement 2022-07-19 12:41:54 +02:00
Till Faelligen 910bd9b4a8 Update history visibility checks to use gmsl
Update tests
2022-07-19 12:37:16 +02:00
Till Faelligen 1c43dbcc12 Remove unused query 2022-07-19 12:36:23 +02:00
Till Faelligen 874489544b Default to shared history visibility 2022-07-19 12:28:47 +02:00
Till Faelligen b540dfa48d Set the visibility when creating events 2022-07-19 12:28:23 +02:00