Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Do not allow a None-limit on PaginationConfig. (#14146) | Patrick Cloke | 2022-10-14 | 1 | -1/+1 |
| | | | | | | | The callers either set a default limit or manually handle a None-limit later on (by setting a default value). Update the callers to always instantiate PaginationConfig with a default limit and then assume the limit is non-None. | ||||
* | typing: check origin server of typing event against room's servers (#13830) | Mathieu Velten | 2022-09-26 | 1 | -2/+5 |
| | | | | | | | This is also using the partial state approximation if needed so we do not block here during a fast join. Signed-off-by: Mathieu Velten <mathieuv@matrix.org> Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> | ||||
* | Faster Remote Room Joins: tell remote homeservers that we are unable to ↵ | reivilibre | 2022-09-23 | 1 | -1/+1 |
| | | | | authorise them if they query a room which has partial state on our server. (#13823) | ||||
* | Update `get_users_in_room` mis-use to get hosts with dedicated ↵ | Eric Eastwood | 2022-08-24 | 1 | -3/+4 |
| | | | | | `get_current_hosts_in_room` (#13605) See https://github.com/matrix-org/synapse/pull/13575#discussion_r953023755 | ||||
* | `synapse.api.auth.Auth` cleanup: make permission-related methods use ↵ | Quentin Gliech | 2022-08-22 | 1 | -6/+4 |
| | | | | | | | | | `Requester` instead of the `UserID` (#13024) Part of #13019 This changes all the permission-related methods to rely on the Requester instead of the UserID. This is a first step towards enabling scoped access tokens at some point, since I expect the Requester to have scope-related informations in it. It also changes methods which figure out the user/device/appservice out of the access token to return a Requester instead of something else. This avoids having store-related objects in the methods signatures. | ||||
* | Copy room serials before handling in `get_new_events_as` (#13392) | Nick Mills-Barrett | 2022-07-26 | 1 | -3/+10 |
| | |||||
* | Revert "Make all `process_replication_rows` methods async (#13304)" (#13312) | Erik Johnston | 2022-07-18 | 1 | -2/+2 |
| | | | This reverts commit 5d4028f217f178fcd384d5bfddd92225b4e78c51. | ||||
* | Make all `process_replication_rows` methods async (#13304) | Nick Mills-Barrett | 2022-07-17 | 1 | -2/+2 |
| | | | | | More prep work for asyncronous caching, also makes all process_replication_rows methods consistent (presence handler already is so). Signed off by Nick @ Beeper (@Fizzadar) | ||||
* | Reduce state pulled from DB due to sending typing and receipts over ↵ | Erik Johnston | 2022-06-06 | 1 | -2/+5 |
| | | | | | federation (#12964) Reducing the amount of state we pull from the DB is useful as fetching state is expensive in terms of DB, CPU and memory. | ||||
* | Additional constants for EDU types. (#12884) | Patrick Cloke | 2022-05-27 | 1 | -4/+7 |
| | | | Instead of hard-coding strings in many places. | ||||
* | Add `StreamKeyType` class and replace string literals with constants (#12567) | Andrew Morgan | 2022-05-16 | 1 | -2/+2 |
| | |||||
* | Improve code documentation for the typing stream over replication. (#12211) | reivilibre | 2022-03-11 | 1 | -2/+3 |
| | |||||
* | Rename various ApplicationServices interested methods (#11915) | Andrew Morgan | 2022-03-03 | 1 | -3/+1 |
| | |||||
* | Remove `HomeServer.get_datastore()` (#12031) | Richard van der Hoff | 2022-02-23 | 1 | -2/+2 |
| | | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733 | ||||
* | Clean up an indirect reference to the homeserver datastore (#11914) | Andrew Morgan | 2022-02-07 | 1 | -2/+2 |
| | |||||
* | Convert all namedtuples to attrs. (#11665) | Patrick Cloke | 2021-12-30 | 1 | -5/+9 |
| | | | To improve type hints throughout the code. | ||||
* | Add type annotations to `synapse.metrics` (#10847) | Sean Quah | 2021-11-17 | 1 | -1/+1 |
| | |||||
* | Enable passing typing stream writers as a list. (#11237) | Nick Barrett | 2021-11-03 | 1 | -3/+3 |
| | | | | This makes the typing stream writer config match the other stream writers that only currently support a single worker. | ||||
* | Improve docstrings for methods related to sending EDUs to application ↵ | Andrew Morgan | 2021-10-21 | 1 | -3/+9 |
| | | | | services (#11138) | ||||
* | Remove unnecessary parentheses around tuples returned from methods (#10889) | Andrew Morgan | 2021-09-23 | 1 | -2/+2 |
| | |||||
* | Add type hints for event streams. (#10856) | Patrick Cloke | 2021-09-21 | 1 | -3/+10 |
| | |||||
* | Require type hints in the handlers module. (#10831) | Patrick Cloke | 2021-09-20 | 1 | -2/+2 |
| | | | | | | | Adds missing type hints to methods in the synapse.handlers module and requires all methods to have type hints there. This also removes the unused construct_auth_difference method from the FederationHandler. | ||||
* | Use direct references for some configuration variables (#10798) | Patrick Cloke | 2021-09-13 | 1 | -1/+1 |
| | | | | Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit). | ||||
* | Add types to synapse.util. (#10601) | reivilibre | 2021-09-10 | 1 | -1/+1 |
| | |||||
* | Include room ID in ignored EDU log messages (#10507) | Dagfinn Ilmari Mannsåker | 2021-08-03 | 1 | -1/+2 |
| | | | | Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | ||||
* | Use inline type hints in `handlers/` and `rest/`. (#10382) | Jonathan de Jong | 2021-07-16 | 1 | -7/+7 |
| | |||||
* | Ignore EDUs for rooms we're not in (#10317) | Dagfinn Ilmari Mannsåker | 2021-07-06 | 1 | -0/+14 |
| | |||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -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>` | ||||
* | Improve tracing for to device messages (#9686) | Erik Johnston | 2021-04-01 | 1 | -1/+5 |
| | |||||
* | Update black, and run auto formatting over the codebase (#9381) | Eric Eastwood | 2021-02-16 | 1 | -5/+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 type hints to various handlers. (#9223) | Patrick Cloke | 2021-01-26 | 1 | -31/+38 |
| | | | | With this change all handlers except the e2e_* ones have type hints enabled. | ||||
* | Don't unnecessarily start bg process while handling typing. (#8668) | Erik Johnston | 2020-10-27 | 1 | -8/+13 |
| | | | There's no point starting a background process when all its going to do is bail if federation isn't enabled. | ||||
* | Fix typos and spelling errors. (#8639) | Patrick Cloke | 2020-10-23 | 1 | -1/+1 |
| | |||||
* | Send some ephemeral events to appservices (#8437) | Will Hunt | 2020-10-15 | 1 | -2/+29 |
| | | | Optionally sends typing, presence, and read receipt information to appservices. | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -1/+1 |
| | |||||
* | Do not propagate typing notifications from shadow-banned users. (#8176) | Patrick Cloke | 2020-08-26 | 1 | -5/+16 |
| | |||||
* | Allow moving typing off master (#7869) | Erik Johnston | 2020-07-16 | 1 | -74/+167 |
| | |||||
* | Fix typo | Erik Johnston | 2020-07-15 | 1 | -1/+1 |
| | |||||
* | Use get_users_in_room rather than state handler in typing for speed | Erik Johnston | 2020-07-15 | 1 | -2/+2 |
| | |||||
* | Refactor getting replication updates from database v2. (#7740) | Erik Johnston | 2020-07-07 | 1 | -0/+3 |
| | |||||
* | Convert the typing handler to async/await. (#7679) | Patrick Cloke | 2020-06-17 | 1 | -18/+11 |
| | |||||
* | Refactor getting replication updates from database. (#7636) | Erik Johnston | 2020-06-16 | 1 | -8/+32 |
| | | | The aim here is to make it easier to reason about when streams are limited and when they're not, by moving the logic into the database functions themselves. This should mean we can kill of `db_query_to_update_function` function. | ||||
* | Remove concept of a non-limited stream. (#7011) | Erik Johnston | 2020-03-20 | 1 | -2/+9 |
| | |||||
* | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) | Patrick Cloke | 2020-02-21 | 1 | -2/+2 |
| | | | | Ensure good comprehension hygiene using flake8-comprehensions. | ||||
* | Refactor the membership check methods in Auth | Richard van der Hoff | 2020-02-18 | 1 | -2/+2 |
| | | | | | these were getting a bit unwieldy, so let's combine `check_joined_room` and `check_user_was_in_room` into a single `check_user_in_room`. | ||||
* | Port synapse.replication.tcp to async/await (#6666) | Erik Johnston | 2020-01-16 | 1 | -1/+1 |
| | | | | | | | | | | * Port synapse.replication.tcp to async/await * Newsfile * Correctly document type of on_<FOO> functions as async * Don't be overenthusiastic with the asyncing.... | ||||
* | Remove unused `get_pagination_rows` methods. (#6557) | Erik Johnston | 2019-12-17 | 1 | -3/+0 |
| | | | Remove unused get_pagination_rows methods | ||||
* | Fixup functions to consistently return deferreds | Erik Johnston | 2019-12-06 | 1 | -1/+1 |
| | |||||
* | Replace instance variations of homeserver with correct case/spacing | Andrew Morgan | 2019-11-12 | 1 | -2/+2 |
| | |||||
* | Remove unnecessary parentheses around return statements (#5931) | Andrew Morgan | 2019-08-30 | 1 | -1/+1 |
| | | | | | 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 :) | ||||
* | Move some timeout checking logs to DEBUG #5785 | Amber Brown | 2019-07-30 | 1 | -1/+1 |
| | |||||
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 1 | -2/+2 |
| | |||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -1/+1 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -57/+17 |
| | |||||
* | Fix grammar and document get_current_users_in_room (#4998) | Andrew Morgan | 2019-04-03 | 1 | -2/+2 |
| | |||||
* | Avoid rebuilding Edu objects in worker mode (#4770) | Richard van der Hoff | 2019-03-04 | 1 | -1/+1 |
| | | | | | In worker mode, on the federation sender, when we receive an edu for sending over the replication socket, it is parsed into an Edu object. There is no point extracting the contents of it so that we can then immediately build another Edu. | ||||
* | Fix typing being reset causing infinite syncs (#4127) | Amber Brown | 2018-11-03 | 1 | -4/+10 |
| | |||||
* | Merge pull request #3964 from matrix-org/rav/remove_localhost_checks | Richard van der Hoff | 2018-09-28 | 1 | -0/+1 |
|\ | | | | | remove spurious federation checks on localhost | ||||
| * | Fix complete fail to do the right thing | Richard van der Hoff | 2018-09-28 | 1 | -0/+1 |
| | | |||||
* | | Improve performance of getting typing updates for replication | Erik Johnston | 2018-09-05 | 1 | -3/+19 |
|/ | | | | | | Fetching the list of all new typing notifications involved iterating over all rooms and comparing their serial. Lets move to using a stream change cache, like we do for other streams. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -6/+5 |
| | |||||
* | Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background | Richard van der Hoff | 2018-04-27 | 1 | -20/+23 |
|\ | |||||
| * | Improve exception handling for background processes | Richard van der Hoff | 2018-04-27 | 1 | -20/+23 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a bunch of places where we fire off a process to happen in the background, but don't have any exception handling on it - instead relying on the unhandled error being logged when the relevent deferred gets garbage-collected. This is unsatisfactory for a number of reasons: - logging on garbage collection is best-effort and may happen some time after the error, if at all - it can be hard to figure out where the error actually happened. - it is logged as a scary CRITICAL error which (a) I always forget to grep for and (b) it's not really CRITICAL if a background process we don't care about fails. So this is an attempt to add exception handling to everything we fire off into the background. | ||||
* | | Use run_in_background in preference to preserve_fn | Richard van der Hoff | 2018-04-27 | 1 | -3/+4 |
|/ | | | | | | While I was going through uses of preserve_fn for other PRs, I converted places which only use the wrapped function once to use run_in_background, to avoid creating the function object. | ||||
* | Split out edu/query registration to a separate class | Erik Johnston | 2018-03-13 | 1 | -1/+1 |
| | |||||
* | Fix typing tests | Erik Johnston | 2017-05-26 | 1 | -7/+5 |
| | |||||
* | Don't double json encode typing replication data | Erik Johnston | 2017-04-05 | 1 | -3/+1 |
| | |||||
* | Add new storage functions for new replication | Erik Johnston | 2017-03-30 | 1 | -0/+3 |
| | | | | | The new replication protocol will keep all the streams separate, rather than muxing multiple streams into one. | ||||
* | Use new federation_sender DI | Erik Johnston | 2016-11-16 | 1 | -2/+2 |
| | |||||
* | Fix infinite typing bug | Erik Johnston | 2016-10-24 | 1 | -2/+10 |
| | | | | | | | There's a bug somewhere that causes typing notifications to not be timed out properly. By adding a paranoia timer and using correct inequalities notifications should stop being stuck, even if it the root cause hasn't been fixed. | ||||
* | Move FEDERATION_PING_INTERVAL timer. Update log line | Erik Johnston | 2016-09-23 | 1 | -8/+10 |
| | |||||
* | Time out typing over federation | Erik Johnston | 2016-09-23 | 1 | -70/+105 |
| | |||||
* | Clobber EDUs in send queue | Erik Johnston | 2016-09-09 | 1 | -0/+1 |
| | |||||
* | Check the user_id for presence/typing matches origin | Erik Johnston | 2016-09-08 | 1 | -1/+8 |
| | |||||
* | Use state handler instead of get_users_in_room/get_joined_hosts | Erik Johnston | 2016-08-26 | 1 | -3/+6 |
| | |||||
* | Preserve some logcontexts | Erik Johnston | 2016-08-24 | 1 | -4/+8 |
| | |||||
* | Don't hit DB for noop replications queries | Erik Johnston | 2016-06-08 | 1 | -0/+3 |
| | |||||
* | Fix typo | Erik Johnston | 2016-06-03 | 1 | -1/+1 |
| | |||||
* | Store the typing users as user_id strings. (#819) | Mark Haines | 2016-06-02 | 1 | -28/+36 |
| | | | Rather than storing them as UserID objects. | ||||
* | Move typing handler out of the Handlers object | Mark Haines | 2016-05-17 | 1 | -18/+15 |
| | |||||
* | Remove get_joined_rooms_for_user from RoomMemberHandler | Mark Haines | 2016-05-16 | 1 | -6/+0 |
| | |||||
* | Replaces calls to fetch_room_distributions_into with get_joined_hosts_for_room | Mark Haines | 2016-05-16 | 1 | -32/+22 |
| | |||||
* | Add a /replication API for extracting the updates that happened on | Mark Haines | 2016-03-01 | 1 | -0/+14 |
| | | | | | | | | | | | | | | | | | | | | | | | | synapse This is necessary for replicating the data in synapse to be visible to a separate service because presence and typing notifications aren't stored in a database so won't be visible to another process. This API can be used to either get the raw data by requesting the tables themselves or to just receive notifications for updates by following the streams meta-stream. Returns updates for each table requested a JSON array of arrays with a row for each row in the table. Each table is prefixed by a header row with the: name of the table, current stream_id position for the table, number of rows, number of columns and the names of the columns. This is followed by the rows that have been added to the server since the requester last asked. The API has a timeout and is hooked up to the notifier so that a slave can long poll for updates. | ||||
* | Measure some /sync related things | Erik Johnston | 2016-02-09 | 1 | -10/+13 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Open up /events to anonymous users for room events only | Daniel Wagner-Hall | 2015-11-05 | 1 | -8/+3 |
| | | | | Squash-merge of PR #345 from daniel/anonymousevents | ||||
* | Remove needless existence checks | Erik Johnston | 2015-08-26 | 1 | -7/+3 |
| | |||||
* | Don't loop over all rooms ever in typing.get_new_events_for_user | Erik Johnston | 2015-08-26 | 1 | -2/+2 |
| | |||||
* | Consolidate duplicate code in notifier | Erik Johnston | 2015-07-02 | 1 | -1/+1 |
| | |||||
* | Don't bother checking for updates if the stream token hasn't advanced for a user | Mark Haines | 2015-05-13 | 1 | -1/+3 |
| | |||||
* | Fix up leak. Add warnings. | Erik Johnston | 2015-05-08 | 1 | -1/+3 |
| | |||||
* | Filter typing nofication events to only those rooms the requesting user is a ↵ | Paul "LeoNerd" Evans | 2015-04-15 | 1 | -2/+14 |
| | | | | member of (SYN-328) | ||||
* | Have TypingNotificationEventSource.get_new_events_for_user() return a ↵ | Paul "LeoNerd" Evans | 2015-04-15 | 1 | -1/+1 |
| | | | | deferred, for consistency and extensibility | ||||
* | We do want to consumeError | Erik Johnston | 2015-02-17 | 1 | -1/+1 |
| | |||||
* | Replace hs.parse_userid with UserID.from_string | Mark Haines | 2015-01-23 | 1 | -1/+2 |
| | |||||
* | Don't try to cancel already-expired timers - SYN-230 | Paul "LeoNerd" Evans | 2015-01-13 | 1 | -2/+8 |
| | |||||
* | Use float rather than integer divisions to turn msec into sec - so timeouts ↵ | Paul "LeoNerd" Evans | 2015-01-12 | 1 | -1/+1 |
| | | | | under 1000msec will actually work | ||||
* | Make typing notification timeouts print a (debug) logging message | Paul "LeoNerd" Evans | 2015-01-12 | 1 | -1/+7 |
| | |||||
* | Update copyright notices | Mark Haines | 2015-01-06 | 1 | -1/+1 |
| | |||||
* | clean up coding style a bit | Mark Haines | 2014-12-16 | 1 | -2/+2 |
| | |||||
* | User.is_mine is no longer a thing. Use hs.is_mine instead. | Erik Johnston | 2014-12-15 | 1 | -1/+1 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor | Erik Johnston | 2014-12-15 | 1 | -20/+105 |
|\ | | | | | | | | | Conflicts: tests/handlers/test_room.py | ||||
| * | Still send typing notifications to myself if I'm the only one in the room ↵ | Paul "LeoNerd" Evans | 2014-12-15 | 1 | -2/+1 |
| | | | | | | | | (it's a lonely life...) | ||||
| * | Send list of typing user IDs as 'user_ids' list within 'content', so that ↵ | Paul "LeoNerd" Evans | 2014-12-12 | 1 | -1/+3 |
| | | | | | | | | m.typing stream events have a toplevel content, for consistency with others | ||||
| * | When users leave rooms mark them as no longer typing in them | Paul "LeoNerd" Evans | 2014-12-11 | 1 | -0/+8 |
| | | |||||
| * | Actually auth-check to ensure people can only send typing notifications for ↵ | Paul "LeoNerd" Evans | 2014-12-11 | 1 | -0/+4 |
| | | | | | | | | rooms they're actually in | ||||
| * | Add a sprinkling of logger.debug() into typing notification handler | Paul "LeoNerd" Evans | 2014-12-11 | 1 | -0/+8 |
| | | |||||
| * | Initial hack at unit tests of room typing REST API | Paul "LeoNerd" Evans | 2014-12-11 | 1 | -0/+7 |
| | | |||||
| * | Avoid cyclic dependency in handler setup | Paul "LeoNerd" Evans | 2014-12-10 | 1 | -4/+10 |
| | | |||||
| * | Hook up the event stream to typing notifications | Paul "LeoNerd" Evans | 2014-12-10 | 1 | -2/+22 |
| | | |||||
| * | Store serial numbers per room for typing event stream purposes | Paul "LeoNerd" Evans | 2014-12-10 | 1 | -13/+28 |
| | | |||||
| * | First hack at implementing timeouts in typing notification handler | Paul "LeoNerd" Evans | 2014-12-10 | 1 | -3/+19 |
| | | |||||
* | | Change DomainSpecificString so that it doesn't use a HomeServer object | Erik Johnston | 2014-12-02 | 1 | -2/+2 |
|/ | |||||
* | Fix pep8 warnings | Mark Haines | 2014-10-30 | 1 | -6/+8 |
| | |||||
* | Construct a source-specific 'SourcePaginationConfig' to pass into ↵ | Paul "LeoNerd" Evans | 2014-10-29 | 1 | -1/+1 |
| | | | | get_pagination_rows; meaning each source doesn't have to care about its own name any more | ||||
* | fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵ | Matthew Hodgson | 2014-09-03 | 1 | -1/+1 |
| | | | | hasn't been incorporated in time for launch. | ||||
* | Renamed get_current_token_part to get_current_key | Paul "LeoNerd" Evans | 2014-08-29 | 1 | -1/+1 |
| | |||||
* | Have EventSource's get_new_events_for_user() API work only on keys within ↵ | Paul "LeoNerd" Evans | 2014-08-29 | 1 | -2/+2 |
| | | | | that source, not overall eventstream tokens | ||||
* | TypingNotificationEventSource has to return proper tokens, not int 0 | Paul "LeoNerd" Evans | 2014-08-29 | 1 | -2/+2 |
| | |||||
* | Define a new event stream data source for typing notifications (currently null) | Paul "LeoNerd" Evans | 2014-08-29 | 1 | -0/+14 |
| | |||||
* | Fix pyflakes warnings | Mark Haines | 2014-08-28 | 1 | -1/+2 |
| | |||||
* | Initial typing notification support - EDU federation, but no timers, and no ↵ | Paul "LeoNerd" Evans | 2014-08-27 | 1 | -0/+146 |
actual push to clients |