summary refs log tree commit diff
path: root/synapse/replication/http/membership.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update license headersPatrick Cloke2023-11-211-10/+16
|
* Add support for knocking to workers. (#15133)Dirk Klimpel2023-03-021-11/+4
|
* Wait for streams to catch up when processing HTTP replication. (#14820)Erik Johnston2023-01-181-12/+10
| | | | This should hopefully mitigate a class of races where data gets out of sync due a HTTP replication request racing with the replication streams.
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-5/+5
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Add missing type hints to synapse.replication.http. (#11856)Patrick Cloke2022-02-081-15/+16
|
* Add type hints for most `HomeServer` parameters (#11095)Sean Quah2021-10-221-3/+3
|
* Extend `ResponseCache` to pass a context object into the callback (#10157)Richard van der Hoff2021-06-141-1/+1
| | | | | This is the first of two PRs which seek to address #8518. This first PR lays the groundwork by extending ResponseCache; a second PR (#10158) will update the SyncHandler to actually use it, and fix the bug. The idea here is that we allow the callback given to ResponseCache.wrap to decide whether its result should be cached or not. We do that by (optionally) passing a ResponseCacheContext into it, which it can modify.
* Implement knock feature (#6739)Sorunome2021-06-091-0/+139
| | | | | | This PR aims to implement the knock feature as proposed in https://github.com/matrix-org/matrix-doc/pull/2403 Signed-off-by: Sorunome mail@sorunome.de Signed-off-by: Andrew Morgan andrewm@element.io
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Use the proper Request in type hints. (#9515)Patrick Cloke2021-03-011-5/+4
| | | | This also pins the Twisted version in the mypy job for CI until proper type hints are fixed throughout Synapse.
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-1/+4
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Add typing to membership Replication class methods (#8809)Andrew Morgan2020-11-271-22/+44
| | | | | This PR grew out of #6739, and adds typing to some method arguments You'll notice that there are a lot of `# type: ignores` in here. This is due to the base methods not matching the overloads here. This is necessary to stop mypy complaining, but a better solution is #8828.
* Add ability for access tokens to belong to one user but grant access to ↵Erik Johnston2020-10-291-4/+2
| | | | | | | | | | another user. (#8616) We do it this way round so that only the "owner" can delete the access token (i.e. `/logout/all` by the "owner" also deletes that token, but `/logout/all` by the "target user" doesn't). A future PR will add an API for creating such a token. When the target user and authenticated entity are different the `Processed request` log line will be logged with a: `{@admin:server as @bob:server} ...`. I'm not convinced by that format (especially since it adds spaces in there, making it harder to use `cut -d ' '` to chop off the start of log lines). Suggestions welcome.
* Remove the deprecated Handlers object (#8494)Patrick Cloke2020-10-091-1/+1
| | | All handlers now available via get_*_handler() methods on the HomeServer.
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-3/+3
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Remove some unused distributor signals (#8216)Patrick Cloke2020-09-091-6/+4
| | | | | Removes the `user_joined_room` and stops calling it since there are no observers. Also cleans-up some other unused signals and related code.
* Convert replication code to async/await. (#7987)Patrick Cloke2020-08-031-3/+5
|
* Generate real events when we reject invites (#7804)Richard van der Hoff2020-07-091-67/+25
| | | | | | | | Fixes #2181. The basic premise is that, when we fail to reject an invite via the remote server, we can generate our own out-of-band leave event and persist it as an outlier, so that we have something to send to the client.
* Add option to move event persistence off master (#7517)Erik Johnston2020-05-221-1/+39
|
* Add ability to wait for replication streams (#7542)Erik Johnston2020-05-221-7/+7
| | | | | | | The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room). Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on. People probably want to look at this commit by commit.
* Propagate reason in remotely rejected invitesErik Johnston2019-11-281-2/+5
|
* Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-311-1/+1
| | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* Port replication http server endpoints to async/awaitErik Johnston2019-10-291-9/+5
|
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-3/+3
| | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* Replace returnValue with return (#5736)Amber Brown2019-07-231-2/+2
|
* Remove support for invite_3pid_guest. (#5625)Richard van der Hoff2019-07-051-65/+0
| | | | | | | | | This has never been documented, and I'm not sure it's ever been used outside sytest. It's quite a lot of poorly-maintained code, so I'd like to get rid of it. For now I haven't removed the database table; I suggest we leave that for a future clearout.
* Run Black. (#5482)Amber Brown2019-06-201-24/+10
|
* Fix registration on workers (#4682)Erik Johnston2019-02-201-2/+2
| | | | | | | | | | * Move RegistrationHandler init to HomeServer * Move post registration actions to RegistrationHandler * Add post regisration replication endpoint * Newsfile
* Fixup logging and docstringsErik Johnston2018-08-081-0/+36
|
* Use new helper base class for membership requestsErik Johnston2018-07-311-171/+91
|
* run isortAmber Brown2018-07-091-2/+2
|
* Fix importsErik Johnston2018-03-141-3/+3
|
* s/join/joined/ in notify_user_membership_changeErik Johnston2018-03-141-3/+3
|
* Implement RoomMemberWorkerHandlerErik Johnston2018-03-131-0/+334