Age | Commit message (Collapse) | Author |
|
|
|
* Enforce valid key IDs
* Don't use key_id from dendrite.yaml as it is in matrix_key.pem
|
|
|
|
|
|
* Initial work on notary support
* Somewhat working (but not properly filtered) notary support, other tweaks
* Update gomatrixserverlib
|
|
* Return early from federated room join
* Synchronous perform-join as long as possible
* Don't allow multiple federated joins to the same room by the same user
|
|
|
|
* Initial work on soft-fail
* Fix state block retrieval
* Copy-pasta QueryLatestEventsAndState code
* Fix state lookup
* Clean up
* Fix up failing sytest
* Linting
* Update previous events SQLite insert query
* Update SQLite InsertPreviousEvent properly
* Hopefully fix the event references updates
Co-authored-by: Kegan Dougal <kegan@matrix.org>
|
|
* Tweak backoffs
* Refactor backoff some more, remove BackoffIfRequired as it adds unnecessary complexity
* Ignore 404s
|
|
* WIP Event rejection
* Still send back errors for rejected events
Instead, discard them at the federationapi /send layer rather than
re-implementing checks at the clientapi/PerformJoin layer.
* Implement rejected events
Critically, rejected events CAN cause state resolution to happen
as it can merge forks in the DAG. This is fine, _provided_ we
do not add the rejected event when performing state resolution,
which is what this PR does. It also fixes the error handling
when NotAllowed happens, as we were checking too early and needlessly
handling NotAllowed in more than one place.
* Update test to match reality
* Modify InputRoomEvents to no longer return an error
Errors do not serialise across HTTP boundaries in polylith mode,
so instead set fields on the InputRoomEventsResponse. Add `Err()`
function to make the API shape basically the same.
* Remove redundant returns; linting
* Update blacklist
|
|
|
|
* SendEventWithState events as new
* Use cumulative state IDs for final event
* Error wrapping in calculateAndSetState
* Handle overwriting same event type and state key
* Hacky way to spot historical events
* Don't exclude from sync
* Don't generate output events when rewriting forward extremities
* Update output event check
* Historical output events
* Define output room event type
* Notify key changes on state
* Don't send our membership event twice
* Deduplicate state entries
* Tweaks
* Remove unnecessary nolint
* Fix current state upsert in sync API
* Send auth events as outliers, state events as rewrite
* Sync API don't consume state events
* Process events actually
* Improve outlier check
* Fix local room check
* Remove extra room check, it seems to break the whole damn world
* Fix federated join check
* Fix nil pointer exception
* Better comments on DeduplicateStateEntries
* Reflow forced federated joins
* Don't force federated join for possibly even local invites
* Comment SendEventWithState better
* Rewrite room state in sync API storage
* Add TODO
* Clean up all room data when receiving create event
* Don't generate output events for rewrites, but instead notify that state is rewritten on the final new event
* Rename to PurgeRoom
* Exclude backfilled messages from /sync
* Split out rewriting state from updating state from state res
Co-authored-by: Kegan Dougal <kegan@matrix.org>
|
|
* Don't use more than 999 variables in SQLite querys.
Solve this problem in a more general and reusable way.
Also fix #1369
Add some unit tests.
Signed-off-by: Henrik Sölver <henrik.solver@gmail.com>
* Don't rely on testify for basic assertions
* Readability improvements and linting
Co-authored-by: Henrik Sölver <henrik.solver@gmail.com>
|
|
|
|
* Add support for database migrations
Closes #1246
This PR does NOT add any migrations as an example. I have
manually tested that the library works with SQL and Go based
upgrades correctly. Documentation should be sufficient for
devs to add migrations.
* Clarifications
* Linting
|
|
Initial implementation of MSC2753, as tested by https://github.com/matrix-org/sytest/pull/944.
Doesn't yet handle unpeeks, peeked EDUs, or history viz changing during a peek - these will follow.
https://github.com/matrix-org/dendrite/pull/1370 has full details.
|
|
|
|
|
|
* Track goids when running with tracing enabled
* Linting
|
|
* Backoff for 401s
* Human-readable retry_after in logs
|
|
|
|
* Use state from RespSendJoin post-check
* Don't create input events for invalid events
* Let's try this again
* Update gomatrixserverlib
* Update gomatrixserverlib to matrix-org/gomatrixserverlib@38f437f
|
|
* Remove current state server
Closes #1365 #1272 #1357
* Remove current state server from scripts/docs
|
|
|
|
* Remove QueryBulkStateContent from current state server
Expected fail due to db impl not existing
* Implement query bulk state content
* Fix up rejecting invites over federation
* Fix bulk content marshalling
|
|
* Use background context when processing event with missing state
* Five minute timeout
* Remove context from txnreq, thread through instead
* Fix unit tests
|
|
|
|
|
|
* User API support for password changes
* Password changes in client API
* Update sytest-whitelist
* Remove debug logging
* Default logout_devices to true
* Fix deleting devices by local part
|
|
* Remove QuerySharedUsers from current state server
* Bugfixes
|
|
|
|
* Remove QueryKnownUsers from current state server
* Fix HTTP mode
|
|
* Sync bug fixes
* Remove logging
|
|
* Remove ServerACLs from the current state server
Functionality moved to roomserver
* Nothing to see here, move along
|
|
|
|
start (#1389)
|
|
|
|
* Move currentstateserver API to roomserver
Stub out DB functions for now, nothing uses the roomserver version yet.
* Allow it to startup
* Implement some current-state-server storage interface functions
* Add missing package
|
|
* Initial FIFOing of roomserver inputs
* Remove EventID response from api.InputRoomEventsResponse
* Don't send back event ID unnecessarily
* Fix ordering hopefully
* Reduce copies, use buffered task channel to reduce contention on other rooms
* Fix error handling
|
|
* Initial rate limiting
* Move rate limiting to client API
* Update rate limits to hopefully be self-cleaning
* Use X-Forwarded-For, add comments
* Reduce rate limit threshold
* Tweak interval
* Configurable backoff
* Review comments, set cleanup interval to 30 seconds
* Allow generate-config to produce sane CI config
* Fix Complement dockerfile
|
|
|
|
* Add Queryer and use embedded structs
* Add Inputer and factor out more RS API stuff
This neatly splits up the RS API based on the functionality it provides,
whilst providing a useful place for code sharing via the `helpers` package.
|
|
|
|
* Versions
* Update build.sh
|
|
* Use federation sender for backfill and getting missing events
* Fix internal URL paths
* Update go.mod/go.sum for matrix-org/gomatrixserverlib#218
* Add missing server implementations in HTTP interface
|
|
- New package `perform` which contains all `Perform` functions
- New package `helpers` which contains helper functions used by both
perform and query/input functions.
- Perform invite/leave have no idea how to `WriteOutputEvents` and this
is now returned from `PerformInvite` or `PerformLeave` respectively.
Still to do:
- RSAPI is fed into the inviter/joiner/leaver - this introduces circular
logic so will need to be removed.
- Put query operations in a `query` package.
- Put input operations (and output) in an `input` package.
- Factor out helper functions as much as possible, possibly rejigging the
storage layer in the process.
|
|
* Factor more things to RoomInfo
* Factor out remaining bits for RoomInfo
* Linting for now
|
|
* Put redactions in the writer goroutine
* Update filters on writer goroutine
|
|
* Fix writers
* Don't use writers in both shared and sqlite3
|
|
|