summary refs log tree commit diff
path: root/stubs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add Unix socket support for Redis connections (#15644)Jason Little2023-05-261-0/+3
| | | | Adds a new configuration setting to connect to Redis via a Unix socket instead of over TCP. Disabled by default.
* Use immutabledict instead of frozendict (#15113)David Robertson2023-03-221-39/+0
| | | | | | | | | | Additionally: * Consistently use `freeze()` in test --------- Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
* Stabilize support for MSC3966: event_property_contains push condition. (#15187)Patrick Cloke2023-03-071-1/+0
| | | | This removes the configuration flag & updates the identifiers to use the stable version.
* Stabilize support for MSC3758: event_property_is push condition (#15185)Patrick Cloke2023-03-061-1/+0
| | | | This removes the configuration flag & updates the identifiers to use the stable version.
* Update intentional mentions (MSC3952) to depend on ↵Patrick Cloke2023-03-021-2/+1
| | | | | | | `exact_event_property_contains` (MSC3966). (#15051) This replaces the specific `is_user_mention` push rule condition used in MSC3952 with the generic `exact_event_property_contains` push rule condition from MSC3966.
* Bump black from 22.12.0 to 23.1.0 (#15103)dependabot[bot]2023-02-221-1/+0
|
* Update intentional mentions (MSC3952) to depend on `exact_event_match` ↵Patrick Cloke2023-02-161-1/+0
| | | | | | | | | | (MSC3758). (#15037) This replaces the specific `is_room_mention` push rule condition used in MSC3952 with the generic `exact_event_match` push rule condition from MSC3758. No functionality changes due to this.
* Implement MSC3966: Add a push rule condition to search for a value in an ↵Patrick Cloke2023-02-141-3/+4
| | | | | | array. (#15045) The `exact_event_property_contains` condition can be used to search for a value inside of an array.
* Support for MSC3758: exact_event_match push condition (#14964)Patrick Cloke2023-02-101-3/+4
| | | | | This specifies to search for an exact value match, instead of string globbing. It only works across non-compound JSON values (null, boolean, integer, and strings).
* Implement MSC3958: suppress notifications from edits (#14960)Patrick Cloke2023-02-031-0/+1
| | | | | | | | Co-authored-by: Brad Murray <brad@beeper.com> Co-authored-by: Nick Barrett <nick@beeper.com> Copy the suppress_edits push rule from Beeper to implement MSC3958. https://github.com/beeper/synapse/blame/9415a1284b1bfb558bd66f28c24ca1611e6c6fa2/rust/src/push/base_rules.rs#L98-L114
* Support the backwards compatibility features in MSC3952. (#14958)Patrick Cloke2023-02-031-0/+1
| | | | If the feature is enabled and the event has a `m.mentions` property, skip processing of the legacy mentions rules.
* Reload the pyo3-log config when the Python logging config changes. (#14976)Patrick Cloke2023-02-031-0/+1
| | | | | | | | | | | Since pyo3-log is initialized very early in the Python start-up it caches the state of the loggers before they're fully initialized (and thus are essentially disabled). Whenever we reload the logging configuration we now also tell pyo3-log to discard any cached logging configuration it has; it will refetch the current logging configuration from Python at the next point it logs. This fixes Rust log lines not appearing in the homeserver logs.
* Implement MSC3952: Intentional mentions (#14823)Patrick Cloke2023-01-271-1/+4
| | | | | | | | MSC3952 defines push rules which searches for mentions in a list of Matrix IDs in the event body, instead of searching the entire event body for display name / local part. This is implemented behind an experimental configuration flag and does not yet implement the backwards compatibility pieces of the MSC.
* Implement MSC3930: polls push rules (#14787)Andrew Morgan2023-01-191-1/+2
|
* Re-enable some linting (#14821)Erik Johnston2023-01-123-4/+1
| | | | | | | * Re-enable some linting * Newsfile * Remove comment
* Factor out common code in tests and fix comments. (#14819)Patrick Cloke2023-01-111-0/+14
|
* Fix-up type hints for tests.push module. (#14816)Patrick Cloke2023-01-111-1/+4
|
* Switch to ruff instead of flake8. (#14633)Patrick Cloke2022-12-215-0/+10
| | | | | ruff is a flake8-compatible Python linter written in Rust. It supports the flake8 plugins that we use and is significantly faster in testing.
* Improve validation of field size limits in events. (#14664)reivilibre2022-12-131-1/+1
|
* Add optional ICU support for user search (#14464)Brendan Abolivier2022-12-121-0/+25
| | | | | | | Fixes #13655 This change uses ICU (International Components for Unicode) to improve boundary detection in user search. This change also adds a new dependency on libicu-dev and pkg-config for the Debian packages, which are available in all supported distros.
* Support MSC1767's `content.body` behaviour; Add base rules from MSC3933 (#14524)Travis Ralston2022-11-281-1/+5
| | | | | | | | | | | * Support MSC1767's `content.body` behaviour in push rules * Add the base rules from MSC3933 * Changelog entry * Flip condition around for finding `m.markup` * Remove forgotten import
* Initial support for MSC3931: Room version push rule feature flags (#14520)Travis Ralston2022-11-281-0/+2
| | | | | | | * Add support for MSC3931: Room Version Supports push rule condition * Create experimental flag for future work, and use it to gate MSC3931 * Changelog entry
* Fix stub return type of `PushRuleEvaluator.run` (#14451)Andrew Morgan2022-11-161-2/+2
|
* Implementation for MSC3664: Pushrules for relations (#11804)DeepBlueV7.X2022-10-251-1/+5
|
* Remove the experimental implementation of MSC3772. (#14094)Patrick Cloke2022-10-121-5/+1
| | | MSC3772 has been abandoned.
* Disable pushing for server ACL events (MSC3786). (#13997)Patrick Cloke2022-10-041-5/+1
| | | | | | Switches to the stable identifier for MSC3786 and enables it by default. This disables pushes of m.room.server_acl events.
* Implement push rule evaluation in Rust. (#13838)Erik Johnston2022-09-291-1/+18
|
* Port the push rule classes to Rust. (#13768)Erik Johnston2022-09-202-0/+37
|
* Check if Rust lib needs rebuilding. (#13759)Erik Johnston2022-09-121-0/+1
| | | This protects against the common mistake of failing to remember to rebuild Rust code after making changes.
* Add a stub Rust crate (#12595)Erik Johnston2022-09-062-0/+1
|
* Update mypy to 0.950 and fix complaints (#12650)David Robertson2022-05-061-6/+13
|
* Remove unused `# type: ignore`s (#12531)David Robertson2022-04-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | Over time we've begun to use newer versions of mypy, typeshed, stub packages---and of course we've improved our own annotations. This makes some type ignore comments no longer necessary. I have removed them. There was one exception: a module that imports `select.epoll`. The ignore is redundant on Linux, but I've kept it ignored for those of us who work on the source tree using not-Linux. (#11771) I'm more interested in the config line which enforces this. I want unused ignores to be reported, because I think it's useful feedback when annotating to know when you've fixed a problem you had to previously ignore. * Installing extras before typechecking Lacking an easy way to install all extras generically, let's bite the bullet and make install the hand-maintained `all` extra before typechecking. Now that https://github.com/matrix-org/backend-meta/pull/6 is merged to the release/v1 branch.
* disallow-untyped-defs in `docker` and `stubs` directories (#12528)David Robertson2022-04-254-10/+15
|
* Fix incorrect type hints for txredis. (#12042)Patrick Cloke2022-03-081-3/+6
| | | | Some properties were marked as RedisProtocol instead of ConnectionHandler, which wraps RedisProtocol instance(s).
* Upgrade mypy to version 0.931 (#12030)Sean Quah2022-02-181-4/+9
| | | Upgrade mypy to 0.931, mypy-zope to 0.3.5 and fix new complaints.
* Add missing type hints to `synapse.logging.context` (#11556)Sean Quah2021-12-141-4/+5
|
* Add types to synapse.util. (#10601)reivilibre2021-09-101-1/+1
|
* Speed up MultiWriterIdGenerator when lots of IDs are in flight. (#10755)Erik Johnston2021-09-032-0/+120
|
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-142-2/+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>`
* Fix remaining mypy issues due to Twisted upgrade. (#9608)Patrick Cloke2021-03-151-1/+1
|
* Add logging for redis connection setup (#9590)Richard van der Hoff2021-03-111-1/+3
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-162-5/+19
| | | | | | | - 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
* Precompute joined hosts and store in Redis (#9198)Erik Johnston2021-01-261-1/+11
|
* Periodically send pings to detect dead Redis connections (#9218)Erik Johnston2021-01-261-4/+8
| | | | | | | | This is done by creating a custom `RedisFactory` subclass that periodically pings all connections in its pool. We also ensure that the `replyTimeout` param is non-null, so that we timeout waiting for the reply to those pings (and thus triggering a reconnect).
* Add an admin API for shadow-banning users. (#9209)Patrick Cloke2021-01-251-1/+0
| | | | | | | | | | This expands the current shadow-banning feature to be usable via the admin API and adds documentation for it. A shadow-banned users receives successful responses to their client-server API requests, but the events are not propagated into rooms. Shadow-banning a user should be used as a tool of last resort and may lead to confusing or broken behaviour for the client.
* Run the linters on a consistent list of files (#9038)Richard van der Hoff2021-01-083-14/+5
| | | | | We were running some linters on some files and some on others. Extract a common setting and use it everywhere.
* Enable mypy for synapse.util.caches (#8547)Richard van der Hoff2020-10-152-6/+182
| | | This seemed to entail dragging in a type stub for SortedList.
* Add unit test for event persister sharding (#8433)Erik Johnston2020-10-021-1/+19
|
* Add type hints for state. (#8140)Patrick Cloke2020-08-241-0/+47
|
* Track command processing as a background process (#7879)Richard van der Hoff2020-07-221-0/+1
| | | | I'm going to be doing more stuff synchronously, and I don't want to lose the CPU metrics down the sofa.
* Fix redis password support. (#7401)Erik Johnston2020-05-041-0/+3
| | | | | We forgot to set the password on the subscriber connection, as well as not calling super methods for overridden connectionMade/connectionLost functions.
* Extend StreamChangeCache to support multiple entities per stream ID (#7303)Richard van der Hoff2020-04-222-0/+137
| | | | | | | | | | | | | | | | | | | First some background: StreamChangeCache is used to keep track of what "entities" have changed since a given stream ID. So for example, we might use it to keep track of when the last to-device message for a given user was received [1], and hence whether we need to pull any to-device messages from the database on a sync [2]. Now, it turns out that StreamChangeCache didn't support more than one thing being changed at a given stream_id (this was part of the problem with #7206). However, it's entirely valid to send to-device messages to more than one user at a time. As it turns out, this did in fact work, because *some* methods of StreamChangeCache coped ok with having multiple things changing on the same stream ID, and it seems we never actually use the methods which don't work on the stream change caches where we allow multiple changes at the same stream ID. But that feels horribly fragile, hence: let's update StreamChangeCache to properly support this, and add some typing and some more tests while we're at it. [1]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L301 [2]: https://github.com/matrix-org/synapse/blob/release-v1.12.3/synapse/storage/data_stores/main/deviceinbox.py#L47-L51
* Add ability to run replication protocol over redis. (#7040)Erik Johnston2020-04-221-0/+40
This is configured via the `redis` config options.