aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-09Version 0.8.3 (#2431)v0.8.3Neil Alexander
* Version 0.8.3 * Update changelog
2022-05-09Begin adding syncapi component tests (#2442)kegsay
* Add very basic syncapi tests * Add a way to inject jetstream messages * implement add_state_ids * bugfixes * Unbreak tests * Remove now un-needed API call * Linting
2022-05-09Don't store invites in sync API that aren't relevant to local users (#2439)Neil Alexander
2022-05-09Federation consumer `adds_state_event_ids` tweak (#2441)Neil Alexander
* Don't ask roomserver for events we already have in federation API * Check number of events returned is as expected * Preallocate array * Improve shape a bit
2022-05-09Don't try to re-fetch the event if it is listed in `adds_state_event_ids` ↵Neil Alexander
(#2437) * Don't try to re-fetch the event in the output message * Try that again * Add the initial event into the set
2022-05-09Add roomserver tests (1/?) (#2434)Till
* Add EventJSONTable tests * Add eventJSON tests * Add EventStateKeysTable tests * Add EventTypesTable tests * Add Events Table tests Move variable declaration outside loops Switch to testify/assert for tests * Move variable declaration outside loop * Remove random data * Fix issue where the EventReferenceSHA256 is not set * Add more tests * Revert "Fix issue where the EventReferenceSHA256 is not set" This reverts commit 8ae34c4e5f78584f0edb479f5a893556d2b95d19. * Update GMSL * Add tests for duplicate entries * Test what happens if we select non-existing NIDs * Add test for non-existing eventType * Really update GMSL
2022-05-09One NATS instance per `BaseDendrite` (#2438)Neil Alexander
* One NATS instance per `BaseDendrite` * Fix roomserver
2022-05-09Update to matrix-org/gomatrixserverlib#307Neil Alexander
2022-05-09Add `(user_id, device_id)` index on OTK table (#2435)Neil Alexander
2022-05-06Version 0.8.3rc1v0.8.3rc1Neil Alexander
2022-05-06Simplify `calculateLatest` (#2430)Neil Alexander
* Simplify `calculateLatest` * Comments
2022-05-06Fix power level event auth bugs (update to matrix-org/gomatrixserverlib#306)Neil Alexander
2022-05-06Move LL cache (#2429)Till
2022-05-06Add `PolylithMode` base config option (#2428)Neil Alexander
* Add `PolylithMode` base config option * Polylith mode always uses HTTP APIs
2022-05-06Produce more useful event auth errors (update to ↵Neil Alexander
matrix-org/gomatrixserverlib#305)
2022-05-06Clean up interface definitions (#2427)kegsay
* tidy up interfaces * remove unused GetCreatorIDForAlias * Add RoomserverUserAPI interface * Define more interfaces * Use AppServiceInternalAPI for consistent naming * clean up federationapi constructor a bit * Fix monolith in -http mode
2022-05-06Add FAQ entry for anonymous stats (#2419)Till
2022-05-05Define component interfaces based on consumers (2/2) (#2425)kegsay
* convert remaining interfaces * Tidy up the userapi interfaces
2022-05-05Update to matrix-org/gomatrixserverlib#303Neil Alexander
2022-05-05Update table names for user API stats tableNeil Alexander
2022-05-05Don't log consumer errors on shutdownNeil Alexander
2022-05-05Define component interfaces based on consumers (1/2) (#2423)kegsay
* Specify interfaces used by appservice, do half of clientapi * convert more deps of clientapi to finer-grained interfaces * Convert mediaapi and rest of clientapi * Somehow this got missed
2022-05-05Use `gomatrixserverlib.Client` instead of `http.Client` (#2421)Neil Alexander
* Update to matrix-org/gomatrixserverlib#303 * Use `gomatrixserverlib.Client` for phone-home stats * Use `gomatrixserverlib.Client` for push notifications * Use `gomatrixserverlib.Client` for appservices * Use `gomatrixserverlib.Client` for three-PID invites
2022-05-05Fix user already joined when using server notices (#2364)Till
2022-05-05Don't use in-memory db for userapi tests (#2417)Till
* Don't use in-memory db * Use WithAllDatabases where possible
2022-05-05Errors from createdb are non-fatal (#2420)kegsay
As they are expected if the database already exists.
2022-05-05syncapi: define specific interfaces for internal HTTP communications (#2416)kegsay
* syncapi: use finer-grained interfaces when making the syncapi * Use specific interfaces for syncapi-roomserver interactions * Define query access token api for shared http auth code
2022-05-04Add opt-in anonymous stats reporting (#2249)Till
* Initial phone home stats queries * Add userAgent to UpdateDeviceLastSeen Add new Table for tracking daily user vists * Add user_daily_visits table * Fix queries * userapi stats tables & queries * userapi interface and internal api * sycnapi stats queries * testing phone home stats * Add complete config to syncapi * add missing files * Fix queries * Send empty request * Add version & monolith stats * Add configuration for phone home stats * Move WASM to its own file, add config and comments * Add tracing methods * Add total rooms * Add more fields, actually send data somewhere * Move stats to the userapi * Move phone home stats to util package * Cleanup * Linter & parts of GH comments * More GH comments changes - Move comments to SQL statements - Shrink interface, add struct for stats - No fatal errors, use defaults * Be more explicit when querying * Fix wrong calculation & wrong query params Add tests * Add Windows stats * ADd build constraint * Use new testing structure Fix issues with getting values when using SQLite Fix wrong AddDate value Export UpdateUserDailyVisits * Fix query params * Fix test * Add comment about countR30UsersSQL and countR30UsersV2SQL; fix test * Update config * Also update example config file * Use OS level proxy, update logging Co-authored-by: kegsay <kegan@matrix.org>
2022-05-03Fix bug in database global setupNeil Alexander
2022-05-03Skip tests that require a database if we can't connect to one (#2413)Neil Alexander
* Skip tests that require a database if we can't connect to one * Add `DENDRITE_SKIP_DB_TESTS` environment variable to bring @kegsay joy * Call it `DENDRITE_TEST_SKIP_NODB` intead
2022-05-03Tidy up `AddPublicRoutes` (#2412)Neil Alexander
* Simplify federation API `AddPublicRoutes` * Simplify client API `AddPublicRoutes` * Simplify media API `AddPublicRoutes` * Simplify sync API `AddPublicRoutes` * Simplify `AddAllPublicRoutes`
2022-05-03Global database connection pool (for monolith mode) (#2411)Neil Alexander
* Allow monolith components to share a single database pool * Don't yell about missing connection strings * Rename field * Setup tweaks * Fix panic * Improve configuration checks * Update config * Fix lint errors * Update comments
2022-05-02Return `null` if MaxFileSizeBytes is 0 (#2409)Till
* Return "null" if MaxFileSizeBytes is 0 * Add comment and nil check (better save than sorry) * Simplify config
2022-04-30Test_Devices, sqlite may return devices in different order, test should ↵Brian Meek
still pass (#2406)
2022-04-30Return "to", if we didn't return any presence events (#2407)Till
Return correct stream position, if we didn't return any presence events
2022-04-29Device list display name fixes (#2405)Neil Alexander
* Get device names from `unsigned` in `/user/devices` * Fix display name updates * Fix bug * Fix another bug
2022-04-29Fix `TestThumbnailsStorage` failing when media results come back in ↵Brian Meek
non-deterministic order; silence expected error when tests are run multiple times against the same postgres database (cherry-picked from #2395) Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-04-29Move admin functions into their own file in the client APINeil Alexander
2022-04-29Add create-account to Getting startedTill Faelligen
2022-04-29Update golangci-lint, how it's installed, and added to the PATH (#2403)Brian Meek
* switch to dendrite server * minor refactor to merge store code * Fix issue where m.room.name is being filtered by the dendrite server * refresh dendrite main * refresh dendrite main * missing merges from the last dendrite refresh * revert unwanted changes in dendrite.yaml * Update golangci-lint, how it's installed, and added to the PATH Co-authored-by: Tak Wai Wong <takwaiw@gmail.com> Co-authored-by: tak-slashtalk <64229756+tak-slashtalk@users.noreply.github.com>
2022-04-29Add restrictions for open registration (#2402)Till
* Add restrications for open registration * Make enable open registration a parameter * Enable registration for CI * Update error message * Shuffle things around a bit * Add a warning at every startup just to be extra annoying * Ignore shared secret when warning about open registration, since it's not strictly required when it is set if registration is otherwise enabled * Make CI happy? * Add missing parameter; try new parameter in upgrade-test Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-04-28Only load members of newly joined rooms (#2389)Till
* Only load members of newly joined rooms * Comment that the query is prepared at runtime Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-04-28Add `/_dendrite/admin/evacuateRoom/{roomID}` (#2401)Neil Alexander
* Add new endpoint to allow admins to evacuate the local server from the room * Guard endpoint * Use right prefix * Auth API * More useful return error rather than a panic * More useful return value again * Update the path * Try using inputer instead * oh provide the config * Try that again * Return affected user IDs * Don't create so many forward extremities * Add missing `Path` to name Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
2022-04-28Limit presence in `/sync` responses (#2394)Till
* Use filter and limit presence count * More limiting * More limiting * Fix unit test * Also limit presence by last_active_ts * Update query, use "from" as the initial lastPos * Get 1000 presence events, they are filtered later Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-04-28Make tests more reliableTill Faelligen
2022-04-28Unlist test since it no longer seems to be flakey (hopefully?)Neil Alexander
2022-04-28Don't answer expensive federation requests for rooms we no longer belong to ↵Neil Alexander
(#2398) This includes `/state`, `/state_ids`, `/get_missing_events` and `/backfill`. This should fix #2396.
2022-04-28Ensure signature map exists (fixes #2393) (#2397)Neil Alexander
2022-04-27Fix #2390 (#2392)Till
Fix duplicate heroes in `/sync` response.
2022-04-27Use Go 1.18 to build Docker images (#2391)0x1a8510f2
Go 1.18 has now been released for a while and the CI already tests Dendrite with Go 1.18 so there should be no issues. Go 1.18 brings some performance improvements for ARM via the register calling convention so it makes sense to switch to it.