summary refs log tree commit diff
path: root/synapse/server.pyi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move EventStream handling into default ReplicationDataHandler (#7493)Erik Johnston2020-05-141-0/+3
| | | This is so that the logic can happen on both master and workers when we move event persistence out.
* Implement OpenID Connect-based login (#7256)Quentin Gliech2020-05-081-0/+5
|
* Add instance name to RDATA/POSITION commands (#7364)Erik Johnston2020-04-291-0/+2
| | | | | This is primarily for allowing us to send those commands from workers, but for now simply allows us to ignore echoed RDATA/POSITION commands that we sent (we get echoes of sent commands when using redis). Currently we log a WARNING on the master process every time we receive an echoed RDATA.
* Fix limit logic for EventsStream (#7358)Richard van der Hoff2020-04-291-0/+5
| | | | | | | | | | | | | | | | | | | * Factor out functions for injecting events into database I want to add some more flexibility to the tools for injecting events into the database, and I don't want to clutter up HomeserverTestCase with them, so let's factor them out to a new file. * Rework TestReplicationDataHandler This wasn't very easy to work with: the mock wrapping was largely superfluous, and it's useful to be able to inspect the received rows, and clear out the received list. * Fix AssertionErrors being thrown by EventsStream Part of the problem was that there was an off-by-one error in the assertion, but also the limit logic was too simple. Fix it all up and add some tests.
* Stop the master relaying USER_SYNC for other workers (#7318)Richard van der Hoff2020-04-221-1/+1
| | | | | | | Long story short: if we're handling presence on the current worker, we shouldn't be sending USER_SYNC commands over replication. In an attempt to figure out what is going on here, I ended up refactoring some bits of the presencehandler code, so the first 4 commits here are non-functional refactors to move this code slightly closer to sanity. (There's still plenty to do here :/). Suggest reviewing individual commits. Fixes (I hope) #7257.
* Move client command handling out of TCP protocol (#7185)Erik Johnston2020-04-061-1/+6
| | | The aim here is to move the command handling out of the TCP protocol classes and to also merge the client and server command handling (so that we can reuse them for redis protocol). This PR simply moves the client paths to the new `ReplicationCommandHandler`, a future PR will move the server paths too.
* Remove usage of "conn_id" for presence. (#7128)Erik Johnston2020-03-301-0/+2
| | | | | | | | | | | | | | | | * Remove `conn_id` usage for UserSyncCommand. Each tcp replication connection is assigned a "conn_id", which is used to give an ID to a remotely connected worker. In a redis world, there will no longer be a one to one mapping between connection and instance, so instead we need to replace such usages with an ID generated by the remote instances and included in the replicaiton commands. This really only effects UserSyncCommand. * Add CLEAR_USER_SYNCS command that is sent on shutdown. This should help with the case where a synchrotron gets restarted gracefully, rather than rely on 5 minute timeout.
* Port PresenceHandler to async/await (#6991)Erik Johnston2020-02-261-0/+5
|
* Add typing to synapse.federation.sender (#6871)Erik Johnston2020-02-071-0/+2
|
* Fix sending server up commands from workers (#6811)Erik Johnston2020-01-301-1/+11
| | | | Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* Wake up transaction queue when remote server comes back online (#6706)Erik Johnston2020-01-171-0/+12
| | | | | This will be used to retry outbound transactions to a remote server if we think it might have come back up.
* Support for routing outbound HTTP requests via a proxy (#6239)Richard van der Hoff2019-11-011-0/+9
| | | | | | | | | | | | | | | | | | | | The `http_proxy` and `HTTPS_PROXY` env vars can be set to a `host[:port]` value which should point to a proxy. The address of the proxy should be excluded from IP blacklists such as the `url_preview_ip_range_blacklist`. The proxy will then be used for * push * url previews * phone-home stats * recaptcha validation * CAS auth validation It will *not* be used for: * Application Services * Identity servers * Outbound federation * In worker configurations, connections from workers to masters Fixes #4198.
* Update black to 19.10b0 (#6304)Amber Brown2019-11-011-8/+8
| | | * update version of black and also fix the mypy config being overridden
* Run Black. (#5482)Amber Brown2019-06-201-27/+24
|
* Fix CI after new release of isortBrendan Abolivier2019-05-131-1/+0
|
* Rename and move the classesRichard van der Hoff2019-03-131-1/+2
|
* Move from TravisCI to BuildKite (#4752)Amber Brown2019-02-271-1/+1
|
* Revert "Prevent showing non-fed rooms in fed /publicRooms"Andrew Morgan2019-02-261-1/+1
|
* Address rich commentsAndrew Morgan2019-02-261-1/+1
|
* Basic initial support for room upgradesRichard van der Hoff2018-10-251-0/+6
| | | | | Currently just creates a new, empty, room, and sends a tombstone in the old room.
* Send users a server notice about consentRichard van der Hoff2018-05-221-0/+4
| | | | | When a user first syncs, we will send them a server notice asking them to consent to the privacy policy if they have not already done so.
* Infrastructure for a server notices roomRichard van der Hoff2018-05-171-0/+12
| | | | | | | Server Notices use a special room which the user can't dismiss. They are created on demand when some other bit of the code calls send_notice. (This doesn't actually do much yet becuse we don't call send_notice anywhere)
* Move RoomCreationHandler out of synapse.handlers.HandlersRichard van der Hoff2018-05-171-0/+3
| | | | | | | Handlers is deprecated nowadays, so let's move this out before I add a new dependency on it. Also fix the docstrings on create_room.
* Factor out resolve_state_groups to a separate handlerRichard van der Hoff2018-02-011-0/+3
| | | | | | We extract the storage-independent bits of the state group resolution out to a separate functiom, and stick it in a new handler, in preparation for its use from the storage layer.
* Move set_password into its own handlerRichard van der Hoff2017-11-291-0/+4
| | | | | | Non-functional refactoring to move set_password. This means that we'll be able to properly deactivate devices and access tokens without introducing a dependency loop.
* Move deactivate_account into its own handlerRichard van der Hoff2017-11-291-1/+6
| | | | | | Non-functional refactoring to move deactivate_account. This means that we'll be able to properly deactivate devices and access tokens without introducing a dependency loop.
* Build MediaRepositoryResource as a homeserver dependencyRichard van der Hoff2017-11-221-0/+7
| | | | | | This avoids the scenario where we have four different PreviewUrlResources configured on a single app, each of which have their own caches and cache clearing jobs.
* Doc some more dynamic Homeserver methodsRichard van der Hoff2017-10-171-0/+8
|
* Fix login with m.login.tokenRichard van der Hoff2016-08-081-0/+4
| | | | | login with token (as used by CAS auth) was broken by 067596d, such that it always returned a 401.
* Move e2e query logic into a handlerRichard van der Hoff2016-08-011-0/+4
|
* Type annotationsRichard van der Hoff2016-07-191-0/+21
Add some type annotations to help PyCharm (in particular) to figure out the types of a bunch of things.