summary refs log tree commit diff
path: root/synapse/push (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2024-06-241-2/+3
|\
| * Fix room `type` typo in mailer (#17336)Eric Eastwood2024-06-241-2/+3
| | | | | | | | | | Correct event content field is `EventContentFields.ROOM_TYPE` (`type`) :white_check_mark: , not `room_type` :x: Spec: https://spec.matrix.org/v1.10/client-server-api/#mroomcreate
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2024-06-181-1/+0
|\|
| * Include user membership on events (#17282)Richard van der Hoff2024-06-131-1/+0
| | | | | | | | | | MSC4115 has now completed FCP, so we can enable it by default and switch to the stable identifier.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2024-05-071-1/+4
|\|
| * Add support for MSC4115 (#17104)Richard van der Hoff2024-04-291-1/+4
| | | | | | | | Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* | Merge remote-tracking branch 'origin/release-v1.106' into matrix-org-hotfixesOlivier 'reivilibre2024-04-251-0/+16
|\|
| * Send an email if the address is already bound to an user account (#16819)mcalinghee2024-04-231-0/+16
| | | | | | | | Co-authored-by: Mathieu Velten <mathieu.velten@beta.gouv.fr> Co-authored-by: Olivier D <odelcroi@gmail.com>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2024-03-261-6/+8
|\|
| * Bump black from 23.10.1 to 24.2.0 (#16936)dependabot[bot]2024-03-131-6/+8
| |
| * Revert "Improve DB performance of calculating badge counts for push. ↵Andrew Morgan2024-03-051-1/+7
| | | | | | | | (#16756)" (#16979)
* | Merge branch 'release-v1.102' into matrix-org-hotfixesAndrew Morgan2024-03-051-1/+7
|\ \
| * | Revert "Improve DB performance of calculating badge counts for push. (#16756)"Andrew Morgan2024-03-051-1/+7
| |/ | | | | | | This reverts commit b11f7b5122061d4908b3328689486bc16dc58445.
* | Merge branch 'develop' into matrix-org-hotfixesAndrew Morgan2024-02-201-0/+23
|\|
| * Add metric for emails sent (#16881)Remi Rampin2024-02-141-0/+23
| | | | | | | | | | This adds a counter `synapse_emails_sent_total` for emails sent. They are broken down by `type`, which are `password_reset`, `registration`, `add_threepid`, `notification` (matching the methods of `Mailer`).
* | Merge branch 'release-v1.100' into matrix-org-hotfixesOlivier Wilkinson (reivilibre)2024-01-2312-0/+12
|\|
| * Correctly mention previous copyright (#16820)Erik Johnston2024-01-2312-0/+12
| | | | | | | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes matrix-org-hotfixesErik Johnston2024-01-121-7/+1
|\|
| * Improve DB performance of calculating badge counts for push. (#16756)Erik Johnston2024-01-111-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The crux of the change is to try and make the queries simpler and pull out fewer rows. Before, there were quite a few joins against subqueries, which caused postgres to pull out more rows than necessary. Instead, let's simplify the query and do some of the filtering out in Python instead, letting Postgres do better optimizations now that it doesn't have to deal with joins against subqueries. Review note: this is a complete rewrite of the function, so not sure how useful the diff is. --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2024-01-0912-131/+198
|\|
| * Merge remote-tracking branch 'gitlab/clokep/license-license' into new_developErik Johnston2023-12-1312-122/+192
| |\
| | * Update license headersPatrick Cloke2023-11-2112-122/+192
| | |
| * | Add config to change the delay before sending a notification email (#16696)Mathieu Velten2023-12-121-9/+6
| |/
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesPatrick Cloke2023-11-081-15/+41
|\|
| * Collect information for PushRuleEvaluator in parallel. (#16590)Patrick Cloke2023-11-061-15/+41
| | | | | | | | | | | | | | | | Fetch information needed for push rule evaluation in parallel. Ideally this would use query pipelining, but this is not available in psycopg2. Due to the database thread pool this may result in little to no parallelization.
* | Merge branch 'release-v1.95' into matrix-org-hotfixesPatrick Cloke2023-10-174-14/+6
|\|
| * Remove manys calls to cursor_to_dict (#16431)Patrick Cloke2023-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | This avoids calling cursor_to_dict and then immediately unpacking the values in the dict for other users. By not creating the intermediate dictionary we can avoid allocating the dictionary and strings for the keys, which should generally be more performant. Additionally this improves type hints by avoid Dict[str, Any] dictionaries coming out of the database layer.
| * Some refactors around receipts stream (#16426)Erik Johnston2023-10-044-13/+5
| |
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesPatrick Cloke2023-10-021-1/+1
|\|
| * Return immutable objects for cachedList decorators (#16350)Patrick Cloke2023-09-191-1/+1
| |
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2023-09-131-5/+28
|\|
| * Add the List-Unsubscribe header for notification emails. (#16274)Patrick Cloke2023-09-111-5/+28
| | | | | | | | | | | | | | | | Adds both the List-Unsubscribe (RFC2369) and List-Unsubscribe-Post (RFC8058) headers to push notification emails, which together should: * Show an "Unsubscribe" link in the MUA UI when viewing Synapse notification emails. * Enable "one-click" unsubscribe (the user never leaves their MUA, which automatically makes a POST request to the specified endpoint).
* | Merge remote-tracking branch 'origin/release-v1.92' into matrix-org-hotfixesDavid Robertson2023-09-051-2/+6
|\|
| * Bump ruff from 0.0.277 to 0.0.286 (#16198)dependabot[bot]2023-08-291-2/+6
| | | | | | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2023-07-202-2/+37
|\|
| * Support room version 11 (#15912)Patrick Cloke2023-07-181-1/+1
| | | | | | | | | | And fix a bug in the implementation of the updated redaction format (MSC2174) where the top-level redacts field was not properly added for backwards-compatibility.
| * Fix push for invites received over federation (#15820)Erik Johnston2023-07-121-1/+36
| |
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2023-06-232-16/+11
|\|
| * Remove experimental MSC2716 implementation to incrementally import history ↵Eric Eastwood2023-06-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | into existing rooms (#15748) Context for why we're removing the implementation: - https://github.com/matrix-org/matrix-spec-proposals/pull/2716#issuecomment-1487441010 - https://github.com/matrix-org/matrix-spec-proposals/pull/2716#issuecomment-1504262734 Anyone wanting to continue MSC2716, should also address these leftover tasks: https://github.com/matrix-org/synapse/issues/10737 Closes https://github.com/matrix-org/synapse/issues/10737 in the fact that it is not longer necessary to track those things.
| * push rules: fix internal conversion from _type to value (#15781)Mathieu Velten2023-06-161-15/+11
| | | | | | Also fix wrong rule names for `is_user_mention` and `is_room_mention`.
* | Merge branch 'release-v1.86' into matrix-org-hotfixesMathieu Velten2023-06-132-8/+2
|\|
| * Stabilize support for MSC3952: Intentional mentions. (#15520)Patrick Cloke2023-06-061-7/+1
| |
| * `N + 3`: Read from column `full_user_id` rather than `user_id` of tables ↵Shay2023-06-021-1/+1
| | | | | | | | `profiles` and `user_filters` (#15649)
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2023-05-241-1/+1
|\|
| * Rename blacklist/whitelist internally. (#15620)Patrick Cloke2023-05-191-1/+1
| | | | | | | | Avoid renaming configuration settings for now and rename internal code to use blocklist and allowlist instead.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2023-05-122-1/+19
|\|
| * Error if attempting to set m.push_rules account data, per MSC4010. (#15555)Patrick Cloke2023-05-091-1/+1
| | | | | | | | | | m.push_rules, like m.fully_read, is a special account data type that cannot be set using the normal /account_data endpoint. Return an error instead of allowing data that will not be used to be stored.
| * Merge branch 'release-v1.83' into developSean Quah2023-05-031-2/+1
| |\
| * | Allow adding random delay to push (#15516)Erik Johnston2023-05-021-0/+18
| | | | | | | | | This is to discourage timing based profiling on the push gateways.
* | | Merge remote-tracking branch 'origin/release-v1.83' into matrix-org-hotfixesSean Quah2023-05-031-2/+1
|\ \ \ | | |/ | |/|
| * | Revert "Reduce the size of the HTTP connection pool for non-pushers" (#15530) v1.83.0rc1Sean Quah2023-05-031-2/+1
| |/ | | | | | | | | | | | | | | | | #15514 introduced a regression where Synapse would encounter `PartialDownloadError`s when fetching OpenID metadata for certain providers on startup. Due to #8088, this prevents Synapse from starting entirely. Revert the change while we decide what to do about the regression.
* | Merge remote-tracking branch 'origin/release-v1.83' into matrix-org-hotfixesSean Quah2023-05-022-78/+116
|\|
| * Reduce the size of the HTTP connection pool for non-pushers. (#15514)Patrick Cloke2023-05-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pushers tend to make many connections to the same HTTP host (e.g. a new event comes in, causes events to be pushed, and then the homeserver connects to the same host many times). Due to this the per-host HTTP connection pool size was increased, but this does not make sense for other SimpleHttpClients. Add a parameter for the connection pool and override it for pushers (making a separate SimpleHttpClient for pushers with the increased configuration). This returns the HTTP connection pool settings to the default Twisted ones for non-pusher HTTP clients.
| * Disable push rule evaluation for rooms excluded from sync (#15361)mcalinghee2023-04-271-0/+1
| | | | | | | | | | | | | | | | * no push for excluded room from sync * add changelog Signed-off-by: Maghen Calinghee <maghen.calinghee@beta.gouv.fr> * correct changelog
| * Add a module API to send an HTTP push notification (#15387)Mathieu Velten2023-04-261-77/+113
| | | | | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesSean Quah2023-03-311-1/+1
|\|
| * Fix missing app variable in mail subject for password resets (#15352)Cyberes2023-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * Update mailer.py Fix `KeyError: 'app'` * Create 15352.bugfix Signed-off-by: Cyberes <cyberes@evulid.cc> --------- Signed-off-by: Cyberes <cyberes@evulid.cc>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2023-03-292-17/+48
|\|
| * Make cleaning up pushers depend on the device_id instead of the token_id ↵Quentin Gliech2023-03-242-17/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (#15280) This makes it so that we rely on the `device_id` to delete pushers on logout, instead of relying on the `access_token_id`. This ensures we're not removing pushers on token refresh, and prepares for a world without access token IDs (also known as the OIDC). This actually runs the `set_device_id_for_pushers` background update, which was forgotten in #13831. Note that for backwards compatibility it still deletes pushers based on the `access_token` until the background update finishes.
* | Merge remote-tracking branch 'origin/release-v1.80' into matrix-org-hotfixesMathieu Velten2023-03-211-26/+8
|\|
| * Stabilize support for MSC3873: disambuguated event push keys. (#15190)Patrick Cloke2023-03-071-25/+8
| | | | | | | | | | | | | | This removes the experimental configuration option and always escapes the push rule condition keys. Also escapes any (experimental) push rule condition keys in the base rules which contain dot in a field name.
| * 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.
* | Merge remote-tracking branch 'origin/release-v1.79' into matrix-org-hotfixesDavid Robertson2023-03-072-27/+16
|\|
| * 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-022-19/+10
| | | | | | | | | | | | | | `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.
| * Fix a typo in MSC3873 config option. (#15138)Patrick Cloke2023-02-231-6/+6
| | | | | | | | Previously the experimental configuration option referred to the wrong MSC number.
| * Bump black from 22.12.0 to 23.1.0 (#15103)dependabot[bot]2023-02-221-1/+0
| |
* | Merge branch 'release-v1.78' into matrix-org-hotfixesOlivier Wilkinson (reivilibre)2023-02-211-17/+46
|\|
| * Update intentional mentions (MSC3952) to depend on `exact_event_match` ↵Patrick Cloke2023-02-161-4/+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-7/+14
| | | | | | | | | | | | array. (#15045) The `exact_event_property_contains` condition can be used to search for a value inside of an array.
| * Return read-only collections from `@cached` methods (#13755)Sean Quah2023-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | It's important that collections returned from `@cached` methods are not modified, otherwise future retrievals from the cache will return the modified collection. This applies to the return values from `@cached` methods and the values inside the dictionaries returned by `@cachedList` methods. It's not necessary for the dictionaries returned by `@cachedList` methods themselves to be read-only. Signed-off-by: Sean Quah <seanq@matrix.org> Co-authored-by: David Robertson <davidr@element.io>
| * Support for MSC3758: exact_event_match push condition (#14964)Patrick Cloke2023-02-101-7/+11
| | | | | | | | | | 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).
| * MSC3873: Escape keys when flattening dicts. (#15004)Patrick Cloke2023-02-081-4/+26
| | | | | | | | | | | | This disambiguates keys which attempt to match fields with a dot in them (e.g. m.relates_to). Disabled by default behind an experimental configuration flag.
* | Merge branch 'release-v1.77' into matrix-org-hotfixesDavid Robertson2023-02-071-11/+74
|\|
| * Add tests for using _flatten_dict with an event. (#15002)Patrick Cloke2023-02-071-8/+5
| |
| * Only notify the target of a membership event (#14971)David Robertson2023-02-061-8/+30
| | | | | | | | | | * Only notify the target of a membership event Naughty, but should be a big speedup in large rooms
| * Add a docstring & tests for _flatten_dict. (#14981)Patrick Cloke2023-02-031-0/+23
| |
| * Support the backwards compatibility features in MSC3952. (#14958)Patrick Cloke2023-02-031-1/+8
| | | | | | | | If the feature is enabled and the event has a `m.mentions` property, skip processing of the legacy mentions rules.
| * Handle malformed values of `notification.room` in power level events (#14942)David Robertson2023-01-301-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Better test for bad values in power levels events The previous test only checked that Synapse didn't raise an exception, but didn't check that we had correctly interpreted the value of the dodgy power level. It also conflated two things: bad room notification levels, and bad user levels. There _is_ logic for converting the latter to integers, but we should test it separately. * Check we ignore types that don't convert to int * Handle `None` values in `notifications.room` * Changelog * Also test that bad values are rejected by event auth * Docstring * linter scripttttttttt
| * Implement MSC3952: Intentional mentions (#14823)Patrick Cloke2023-01-271-1/+24
| | | | | | | | | | | | | | | | 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.
* | Fix stupid bugDavid Robertson2023-02-021-2/+4
| |
* | Don't notify a target who's not in the roomDavid Robertson2023-02-021-2/+11
| | | | | | | | Also avoid unncessary DB queries when creating a room
* | Only notify the target of a membership eventDavid Robertson2023-02-021-9/+20
| | | | | | | | | | | | Naughty, but should be a big speedup in large rooms Changelog
* | Merge remote-tracking branch 'origin/release-v1.75' into matrix-org-hotfixesDavid Robertson2023-01-101-4/+1
|\|
| * Remove undocumented device from pushrules (#14727)Jeyachandran Rathnam2023-01-091-4/+1
| | | | | | | | | | | | | | | | | | | | | | * Remove undocumented device from pushrules * Add changelog * Update changelog.d/14727.misc * Rename 14727.misc to 14727.bugfix Co-authored-by: David Robertson <davidr@element.io>
* | Merge branch 'release-v1.74' into matrix-org-hotfixesSean Quah2022-12-132-7/+3
|\|
| * Improve validation of field size limits in events. (#14664)reivilibre2022-12-131-5/+1
| |
| * Move `StateFilter` to `synapse.types` (#14668)David Robertson2022-12-122-2/+2
| | | | | | | | | | * Move `StateFilter` to `synapse.types` * Changelog
* | Merge branch 'develop' into matrix-org-hotfixesOlivier Wilkinson (reivilibre)2022-12-072-19/+12
|\|
| * Add `push.enabled` option to disable push notification calculation (#14551)Will Hunt2022-12-011-0/+3
| | | | | | | | | | | | | | * Add initial option * changelog * Some more linting
| * Aggregate unread notif count query for badge count calculation (#14255)Nick Mills-Barrett2022-11-301-19/+9
| | | | | | | | | | | | Fetch the unread notification counts used by the badge counts in push notifications for all rooms at once (instead of fetching them per room).
* | Merge remote-tracking branch 'origin/release-v1.73' into matrix-org-hotfixesDavid Robertson2022-11-291-1/+34
|\|
| * Support MSC1767's `content.body` behaviour; Add base rules from MSC3933 (#14524)Travis Ralston2022-11-281-1/+28
| | | | | | | | | | | | | | | | | | | | | | * 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/+6
| | | | | | | | | | | | | | * Add support for MSC3931: Room Version Supports push rule condition * Create experimental flag for future work, and use it to gate MSC3931 * Changelog entry
* | Merge branch 'release-v1.72' into matrix-org-hotfixesErik Johnston2022-11-161-3/+13
|\|
| * Send content rules with pattern_type to clients (#14356)DeepBlueV7.X2022-11-151-3/+13
| |
* | Merge branch 'release-v1.71' into matrix-org-hotfixesDavid Robertson2022-11-011-14/+109
|\|
| * Implementation for MSC3664: Pushrules for relations (#11804)DeepBlueV7.X2022-10-251-1/+48
| |
| * Add initial power level event to batch of bulk persisted events when ↵Shay2022-10-211-13/+61
| | | | | | | | creating a new room. (#14228)
* | Merge remote-tracking branch 'origin/release-v1.70' into matrix-org-hotfixesErik Johnston2022-10-182-65/+17
|\|
| * Return the main timeline for events which are not part of a thread. (#14140)Patrick Cloke2022-10-121-1/+1
| | | | | | | | Fixes a bug where threaded receipts could not be sent for the main timeline.
| * Remove the experimental implementation of MSC3772. (#14094)Patrick Cloke2022-10-121-61/+3
| | | | | | MSC3772 has been abandoned.
| * Merge tag 'v1.69.0rc2' into developSean Quah2022-10-061-1/+8
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.69.0rc2 (2022-10-06) ============================== Please note that legacy Prometheus metric names are now deprecated and will be removed in Synapse 1.73.0. Server administrators should update their dashboards and alerting rules to avoid using the deprecated metric names. See the [upgrade notes](https://matrix-org.github.io/synapse/v1.69/upgrade.html#upgrading-to-v1690) for more details. Deprecations and Removals ------------------------- - Deprecate the `generate_short_term_login_token` method in favor of an async `create_login_token` method in the Module API. ([\#13842](https://github.com/matrix-org/synapse/issues/13842)) Internal Changes ---------------- - Ensure Synapse v1.69 works with upcoming database changes in v1.70. ([\#14045](https://github.com/matrix-org/synapse/issues/14045)) - Fix a bug introduced in Synapse v1.68.0 where messages could not be sent in rooms with non-integer `notifications` power level. ([\#14073](https://github.com/matrix-org/synapse/issues/14073)) - Temporarily pin build-system requirements to workaround an incompatibility with poetry-core 1.3.0. This will be reverted before the v1.69.0 release proper, see [\#14079](https://github.com/matrix-org/synapse/issues/14079). ([\#14080](https://github.com/matrix-org/synapse/issues/14080))
| * | Recursively fetch the thread for receipts & notifications. (#13824)Patrick Cloke2022-10-041-0/+5
| | | | | | | | | | | | | | | | | | Consider an event to be part of a thread if you can follow a chain of relations up to a thread root. Part of MSC3773 & MSC3771.
| * | Track notification counts per thread (implement MSC3773). (#13776)Patrick Cloke2022-10-042-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | When retrieving counts of notifications segment the results based on the thread ID, but choose whether to return them as individual threads or as a single summed field by letting the client opt-in via a sync flag. The summarization code is also updated to be per thread, instead of per room.
* | | Merge remote-tracking branch 'origin/release-v1.69' into matrix-org-hotfixesSean Quah2022-10-061-1/+8
|\ \ \ | | |/ | |/|
| * | Fix sending events into rooms with non-integer power levels (#14073)David Robertson2022-10-061-1/+8
| |/
* | Merge remote-tracking branch 'origin/release-v1.69' into matrix-org-hotfixesSean Quah2022-10-041-0/+5
|\|
| * Skip filtering during push if there are no push actions (#13992)Erik Johnston2022-09-301-0/+5
| |
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-09-304-397/+86
|\|
| * Speed up calculating push actions in large rooms (#13973)Erik Johnston2022-09-301-10/+15
| | | | | | | | | | We move the expensive check of visibility to after calculating push actions, avoiding the expensive check for users who won't get pushed anyway. I think this should have a big impact on rooms with large numbers of local users that have pushed disabled.
| * Implement push rule evaluation in Rust. (#13838)Erik Johnston2022-09-293-381/+63
| |
| * Always send default and rule_id to clients (#13904)Nicolas Werner2022-09-291-4/+2
| |
| * fix: Push notifications for invite over federation (#13719)Kateřina Churanová2022-09-282-11/+15
| |
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-09-285-609/+75
|\|
| * Track device IDs for pushers (#13831)Brendan Abolivier2022-09-212-3/+9
| | | | | | Second half of the MSC3881 implementation
| * Support enabling/disabling pushers (from MSC3881) (#13799)Brendan Abolivier2022-09-212-20/+63
| | | | | | Partial implementation of MSC3881
| * Port the push rule classes to Rust. (#13768)Erik Johnston2022-09-203-589/+6
| |
* | Merge branch 'release-v1.68' into matrix-org-hotfixesOlivier Wilkinson (reivilibre)2022-09-201-14/+15
|\|
| * Update event push action and receipt tables to support threads. (#13753)Patrick Cloke2022-09-141-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a `thread_id` column to the `event_push_actions`, `event_push_actions_staging`, and `event_push_summary` tables. This will notifications to be segmented by the thread in a future pull request. The `thread_id` column stores the root event ID or the special value `"main"`. The `thread_id` column for `event_push_actions` and `event_push_summary` is backfilled with `"main"` for all existing rows. New entries into `event_push_actions` and `event_push_actions_staging` will get the proper thread ID. `receipts_linearized` and `receipts_graph` also gain a `thread_id` column, which is similar, except `NULL` is a special value meaning the receipt is "unthreaded". See MSC3771 and MSC3773 for where this data will be useful.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-09-141-3/+10
|\|
| * Concurrently collect room unread counts for push badges (#13765)Nick Mills-Barrett2022-09-091-3/+10
| | | | | | | | | | | | | | Most of the time this function is heavily cached, but when that isn't the case fetching the counts room by room slows down push delivery on users with many (thousands) of rooms. Signed off by Nick @ Beeper.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-09-061-1/+6
|\|
| * Disable calculating unread counts unless the config flag is enabled. (#13694)Patrick Cloke2022-09-011-1/+6
| | | | | | | | | | | | | | | | This avoids doing work that will never be used (since the resulting unread counts will never be sent in a /sync response). The negative of doing this is that unread counts will be incorrect when the feature is initially enabled.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-08-171-1/+12
|\|
| * Fix breaking event sending due to bad push rule (#13547)Erik Johnston2022-08-171-1/+12
| | | | | | | | | | | | | | Broke by #13522 It looks like we have some rules in the DB with a priority class less than 0 that don't override the base rules. Before these were just dropped, but #13522 made that a hard error.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-08-174-248/+402
|\|
| * Make push rules use proper structures. (#13522)Erik Johnston2022-08-164-248/+402
| | | | | | | | | | | | | | | | | | | | | | | | This improves load times for push rules: | Version | Time per user | Time for 1k users | | -------------------- | ------------- | ----------------- | | Before | 138 µs | 138ms | | Now (with custom) | 2.11 µs | 2.11ms | | Now (without custom) | 49.7 ns | 0.05 ms | This therefore has a large impact on send times for rooms with large numbers of local users in the room.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-07-222-11/+23
|\|
| * Merge remote-tracking branch 'origin/master' into developErik Johnston2022-07-201-0/+7
| |\
| | * Don't include appservice users when calculating push rules (#13332)Erik Johnston2022-07-201-0/+7
| | | | | | | | | This can cause a lot of extra load on servers with lots of appservice users. Introduced in #13078
| * | Fix overcounting of pushers when they are replaced (#13296)Sean Quah2022-07-181-11/+16
| |/ | | | | | | Signed-off-by: Sean Quah <seanq@matrix.org>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-07-121-341/+53
|\|
| * Don't pull out the full state when calculating push actions (#13078)Erik Johnston2022-07-111-341/+53
| |
* | Merge remote-tracking branch 'origin/release-v1.62' into matrix-org-hotfixesErik Johnston2022-06-281-1/+7
|\|
| * Update MSC3786 implementation: Check the `state_key` (#12939)Šimon Brandner2022-06-271-1/+7
| | | | | | Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-06-172-23/+17
|\|
| * Speed up `get_unread_event_push_actions_by_room` (#13005)Erik Johnston2022-06-151-20/+13
| | | | | | | | | | | | | | | | | | | | | | Fixes #11887 hopefully. The core change here is that `event_push_summary` now holds a summary of counts up until a much more recent point, meaning that the range of rows we need to count in `event_push_actions` is much smaller. This needs two major changes: 1. When we get a receipt we need to recalculate `event_push_summary` rather than just delete it 2. The logic for deleting `event_push_actions` is now divorced from calculating `event_push_summary`. In future it would be good to calculate `event_push_summary` while we persist a new event (it should just be a case of adding one to the relevant rows in `event_push_summary`), as that will further simplify the get counts logic and remove the need for us to periodically update `event_push_summary` in a background job.
| * Move the "email unsubscribe" resource, refactor the macaroon generator & ↵Quentin Gliech2022-06-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplify the access token verification logic. (#12986) This simplifies the access token verification logic by removing the `rights` parameter which was only ever used for the unsubscribe link in email notifications. The latter has been moved under the `/_synapse` namespace, since it is not a standard API. This also makes the email verification link more secure, by embedding the app_id and pushkey in the macaroon and verifying it. This prevents the user from tampering the query parameters of that unsubscribe link. Macaroon generation is refactored: - Centralised all macaroon generation and verification logic to the `MacaroonGenerator` - Moved to `synapse.utils` - Changed the constructor to require only a `Clock`, hostname, and a secret key (instead of a full `Homeserver`). - Added tests for all methods.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-06-067-21/+158
|\|
| * Wait for lazy join to complete when getting current state (#12872)Erik Johnston2022-06-011-1/+3
| |
| * Rename storage classes (#12913)Erik Johnston2022-05-313-10/+14
| |
| * Fix invite notifications for users without pushers (#12840)DeepBlueV7.X2022-05-301-6/+4
| | | | | | | | Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de> Co-authored-by: Brendan Abolivier <github@brendanabolivier.com>
| * Fix up `state_store` naming (#12871)Erik Johnston2022-05-251-3/+3
| |
| * Remove `dont_notify` from the `.m.rule.room.server_acl` rule (#12849)Šimon Brandner2022-05-241-1/+1
| | | | | | | | Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
| * Experimental support for MSC3772 (#12740)Patrick Cloke2022-05-244-3/+136
| | | | | | | | | | | | | | | | | | | | Implements the following behind an experimental configuration flag: * A new push rule kind for mutually related events. * A new default push rule (`.m.rule.thread_reply`) under an unstable prefix. This is missing part of MSC3772: * The `.m.rule.thread_reply_to_me` push rule, this depends on MSC3664 / #11804.
* | Merge remote-tracking branch 'origin/release-v1.60' into matrix-org-hotfixesSean Quah2022-05-245-84/+160
|\|
| * Update EventContext `get_current_event_ids` and `get_prev_event_ids` to ↵Shay2022-05-201-2/+7
| | | | | | | | accept state filters and update calls where possible (#12791)
| * Fix push for m.read events (#12721)SpiritCroc2022-05-171-1/+1
| | | | | | | | badge_count_last_call was always zero when the response for push notifications included a "rejected" key which mapped to an empty list.
| * Consolidate logic for parsing relations. (#12693)Patrick Cloke2022-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Parse the `m.relates_to` event content field (which describes relations) in a single place, this is used during: * Event persistence. * Validation of the Client-Server API. * Fetching bundled aggregations. * Processing of push rules. Each of these separately implement the logic and each made slightly different assumptions about what was valid. Some had minor / potential bugs.
| * Remove unneeded `ActionGenerator` class. (#12691)Patrick Cloke2022-05-113-53/+7
| | | | | | | | It simply passes through to `BulkPushRuleEvaluator`, which can be called directly instead.
| * Refactor `EventContext` (#12689)Erik Johnston2022-05-101-0/+4
| | | | | | | | | | | | | | | | | | | | Refactor how the `EventContext` class works, with the intention of reducing the amount of state we fetch from the DB during event processing. The idea here is to get rid of the cached `current_state_ids` and `prev_state_ids` that live in the `EventContext`, and instead defer straight to the database (and its caching). One change that may have a noticeable effect is that we now no longer prefill the `get_current_state_ids` cache on a state change. However, that query is relatively light, since its just a case of reading a table from the DB (unlike fetching state at an event which is more heavyweight). For deployments with workers this cache isn't even used. Part of #12684
| * Move free functions into PushRuleEvaluatorForEvent. (#12677)Patrick Cloke2022-05-102-34/+68
| | | | | | | | | | | | * Move `_condition_checker` into `PushRuleEvaluatorForEvent`. * Move the condition cache into `PushRuleEvaluatorForEvent`. * Improve docstrings. * Inline a method which is only called once.
| * Add class-diagrams and notes for push. (#12676)Patrick Cloke2022-05-101-0/+79
| |
* | Merge branch 'release-v1.59' into matrix-org-hotfixesDavid Robertson2022-05-102-1/+18
|\|
| * Implement MSC3786: Add a default push rule to ignore m.room.server_acl ↵Šimon Brandner2022-05-101-0/+15
| | | | | | | | | | | | events (#12601) Fixes vector-im/element-web#20788 Implements matrix-org/matrix-spec-proposals#3786
| * Implement changes to MSC2285 (hidden read receipts) (#12168)Šimon Brandner2022-05-041-1/+3
| | | | | | | | | | * Changes hidden read receipts to be a separate receipt type (instead of a field on `m.read`). * Updates the `/receipts` endpoint to accept `m.fully_read`.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-04-071-1/+1
|\|
| * Refactor and convert `Linearizer` to async (#12357)Sean Quah2022-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | Refactor and convert `Linearizer` to async. This makes a `Linearizer` cancellation bug easier to fix. Also refactor to use an async context manager, which eliminates an unlikely footgun where code that doesn't immediately use the context manager could forget to release the lock. Signed-off-by: Sean Quah <seanq@element.io>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-03-292-19/+22
|\|
| * Un-revert Jinja2 fix (#12313)Brendan Abolivier2022-03-281-4/+5
| | | | | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
| * Add cache for `get_membership_from_event_ids` (#12272)Erik Johnston2022-03-251-14/+16
| | | | | | | | | | This should speed up push rule calculations for rooms with large numbers of local users when the main push rule cache fails. Co-authored-by: reivilibre <oliverw@matrix.org>
| * Merge branch 'master' into developRichard van der Hoff2022-03-241-5/+4
| |\
| | * Revert "Replace instances of deprecated `Jinja2.Markup` with ↵Andrew Morgan2022-03-241-5/+4
| | | | | | | | | | | | | | | `markupsafe.Markup`" (#12296) This reverts commit 8810c93e828a9ed1dcb008d08be8aa9fcb4d28c3.
| * | Merge branch 'master' into developAndrew Morgan2022-03-241-4/+5
| |\|
| | * Replace instances of deprecated `Jinja2.Markup` with `markupsafe.Markup` ↵Andrew Morgan2022-03-241-4/+5
| | | | | | | | | | | | | | | (#12289) Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
| * | Use the ignored_users table to test event visibility & sync. (#12225)Patrick Cloke2022-03-151-1/+1
| |/ | | | | | | | | Instead of fetching the raw account data and re-parsing it. The ignored_users table is a denormalised version of the account data for quick searching.
* | Merge branch 'release-v1.55' into matrix-org-hotfixesDavid Robertson2022-03-153-25/+25
|\|
| * Add an additional HTTP pusher + push rule tests. (#12188)Nick Mills-Barrett2022-03-113-25/+25
| | | | | | And rename the field used for caching from _id to _cache_key.
* | Merge commit 'd8001' (pre v1.54.0rc1) into matrix-org-hotfixesOlivier Wilkinson (reivilibre)2022-03-027-12/+12
|\|
| * Fix `PushRuleEvaluator` and `Filter` to work on frozendicts (#12100)Richard van der Hoff2022-02-281-4/+4
| | | | | | | | | | | | | | | | | | | | * Fix `PushRuleEvaluator` to work on frozendicts frozendicts do not (necessarily) inherit from dict, so this needs to handle them correctly. * Fix event filtering for frozen events Looks like this one was introduced by #11194.
| * Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-236-8/+8
| | | | | | | | | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2022-02-222-6/+13
|\|
| * Upgrade mypy to version 0.931 (#12030)Sean Quah2022-02-182-5/+7
| | | | | | Upgrade mypy to 0.931, mypy-zope to 0.3.5 and fix new complaints.
| * Prevent duplicate push notifications for room reads (#11835)lukasdenk2022-02-171-1/+6
| |
* | Merge branch 'release-v1.53' into matrix-org-hotfixesSean Quah2022-02-151-212/+7
|\|
| * Revert experimental push rules from #7997. (#11884)Patrick Cloke2022-02-021-212/+7
| | | | | | Manually reverts the merge from cdbb8e6d6e36e0b6bc36e676d8fe66c96986b399.
* | Merge branch 'release-v1.52' into matrix-org-hotfixesDavid Robertson2022-02-011-1/+1
|\|
| * Improvements to bundling aggregations. (#11815)Patrick Cloke2022-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is some odds and ends found during the review of #11791 and while continuing to work in this code: * Return attrs classes instead of dictionaries from some methods to improve type safety. * Call `get_bundled_aggregations` fewer times. * Adds a missing assertion in the tests. * Do not return empty bundled aggregations for an event (preferring to not include the bundle at all, as the docstring states).
* | Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixesAndrew Morgan2022-01-193-30/+30
|\|
| * Fix missing app variable in mail subject (#11745)David Robertson2022-01-131-2/+2
| | | | | | | | | | documentation claims that you can use the %(app)s variable in password_reset and email_validation subjects, but if you do you end up with an error 500 Co-authored-by: br4nnigan <10244835+br4nnigan@users.noreply.github.com>
| * Use auto_attribs/native type hints for attrs classes. (#11692)Patrick Cloke2022-01-132-28/+28
| |
* | Merge branch 'release-v1.50' into matrix-org-hotfixesOlivier Wilkinson (reivilibre)2022-01-056-43/+46
|\|
| * Re-apply: Move glob_to_regex and re_word_boundary to matrix-python-common ↵reivilibre2022-01-051-3/+4
| | | | | | | | | | #11505 (#11687) Co-authored-by: Sean Quah <seanq@element.io>
| * Add type hints to event_push_actions. (#11594)Patrick Cloke2021-12-214-38/+36
| |
| * Ensure emails are canonicalized before fetching associated user. (#11547)Patrick Cloke2021-12-101-1/+4
| | | | | | | | This should fix pushers with an email in non-canonical form is used as the pushkey.
| * Add a constant for receipt types (m.read). (#11531)Patrick Cloke2021-12-081-1/+2
| | | | | | And expand some type hints in the receipts storage module.
* | Merge branch 'release-v1.49' into matrix-org-hotfixesSean Quah2021-12-074-34/+187
|\|
| * Revert "Move `glob_to_regex` and `re_word_boundary` to ↵Sean Quah2021-12-071-4/+3
| | | | | | | | | | | | `matrix-python-common` (#11505) (#11527) This reverts commit a77c36989785c0d5565ab9a1169f4f88e512ce8a.
| * Move `glob_to_regex` and `re_word_boundary` to `matrix-python-common` (#11505)Sean Quah2021-12-061-3/+4
| |
| * Improved push typing (#11409)Marcus2021-11-304-34/+187
| | | | | | Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
* | Merge branch 'release-v1.47' into matrix-org-hotfixesOlivier Wilkinson (reivilibre)2021-11-092-6/+8
|\|
| * Add remaining type hints to `synapse.events`. (#11098)Patrick Cloke2021-11-022-6/+8
| |
* | Merge branch 'release-v1.45' into matrix-org-hotfixesBrendan Abolivier2021-10-125-9/+23
|\|
| * disallow-untyped-defs for synapse.push (#11023)David Robertson2021-10-114-8/+22
| |
| * Relax `ignore-missing-imports` for modules that have stubs now and update ↵David Robertson2021-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | mypy (#11006) Updating mypy past version 0.9 means that third-party stubs are no-longer distributed with typeshed. See http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html for details. We therefore pull in stub packages in setup.py Additionally, some modules that we were previously ignoring import failures for now have stubs. So let's use them. The rest of this change consists of fixups to make the newer mypy + stubs pass CI. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2021-09-283-3/+5
|\|
| * Encode JSON responses on a thread in C, mk2 (#10905)Erik Johnston2021-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | Currently we use `JsonEncoder.iterencode` to write JSON responses, which ensures that we don't block the main reactor thread when encoding huge objects. The downside to this is that `iterencode` falls back to using a pure Python encoder that is *much* less efficient and can easily burn a lot of CPU for huge responses. To fix this, while still ensuring we don't block the reactor loop, we encode the JSON on a threadpool using the standard `JsonEncoder.encode` functions, which is backed by a C library. Doing so, however, requires `respond_with_json` to have access to the reactor, which it previously didn't. There are two ways of doing this: 1. threading through the reactor object, which is a bit fiddly as e.g. `DirectServeJsonResource` doesn't currently take a reactor, but is exposed to modules and so is a PITA to change; or 2. expose the reactor in `SynapseRequest`, which requires updating a bunch of servlet types. I went with the latter as that is just a mechanical change, and I think makes sense as a request already has a reactor associated with it (via its http channel).
| * Use direct references for configuration variables (part 4). (#10893)Patrick Cloke2021-09-231-1/+3
| |
| * Use direct references for some configuration variables (part 3) (#10885)Patrick Cloke2021-09-231-1/+1
| | | | | | | | | | | | | | | | This avoids the overhead of searching through the various configuration classes by directly referencing the class that the attributes are in. It also improves type hints since mypy can now resolve the types of the configuration variables.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesDavid Robertson2021-09-224-11/+11
|\|
| * Use direct references for some configuration variables (part 2) (#10812)Patrick Cloke2021-09-154-11/+11
| |
* | Merge branch 'release-v1.43' of github.com:matrix-org/synapse into ↵Andrew Morgan2021-09-141-7/+7
|\| | | | | | | matrix-org-hotfixes
| * Use direct references for some configuration variables (#10798)Patrick Cloke2021-09-131-7/+7
| | | | | | | | Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit).
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesRichard van der Hoff2021-09-101-1/+23
|\|
| * Correctly include room avatars in email notifications (#10658)David Robertson2021-09-011-1/+23
| | | | | | | | | | | | | | | | Judging by the template, this was intended ages ago, but we never actually passed an avatar URL to the template. So let's provide one. Closes #1546. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesOlivier Wilkinson (reivilibre)2021-08-032-2/+17
|\|
| * Remove shebang line from module files (#10415)V024602021-07-291-1/+0
| | | | | | Signed-off-by: Kai A. Hiller <V02460@gmail.com>
| * Update the notification email subject when invited to a space. (#10426)Patrick Cloke2021-07-211-1/+17
| |
* | Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixesAndrew Morgan2021-07-201-16/+8
|\|
| * Add a module type for account validity (#9884)Brendan Abolivier2021-07-161-16/+8
| | | | | | | | | | This adds an API for third-party plugin modules to implement account validity, so they can provide this feature instead of Synapse. The module implementing the current behaviour for this feature can be found at https://github.com/matrix-org/synapse-email-account-validity. To allow for a smooth transition between the current feature and the new module, hooks have been added to the existing account validity endpoints to allow their behaviours to be overridden by a module.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2021-07-169-21/+21
|\|
| * Use inline type hints in various other places (in `synapse/`) (#10380)Jonathan de Jong2021-07-159-21/+21
| |
* | Merge branch 'release-v1.38' into matrix-org-hotfixesBrendan Abolivier2021-07-061-2/+2
|\|
| * Move methods involving event authentication to EventAuthHandler. (#10268)Patrick Cloke2021-07-011-2/+2
| | | | | | Instead of mixing them with user authentication methods.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2021-05-251-45/+8
|\|
| * Split multiplart email sending into a dedicated handler (#9977)Brendan Abolivier2021-05-171-45/+8
| | | | | | Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* | Merge branch 'release-v1.33.2' into matrix-org-hotfixesBrendan Abolivier2021-05-111-52/+3
|\|
| * Merge pull request from GHSA-x345-32rc-8h85Richard van der Hoff2021-05-111-52/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests for push rule pattern matching * tests for acl pattern matching * factor out common `re.escape` * Factor out common re.compile * Factor out common anchoring code * add word_boundary support to `glob_to_regex` * Use `glob_to_regex` in push rule evaluator NB that this drops support for character classes. I don't think anyone ever used them. * Improve efficiency of globs with multiple wildcards The idea here is that we compress multiple `*` globs into a single `.*`. We also need to consider `?`, since `*?*` is as hard to implement efficiently as `**`. * add assertion on regex pattern * Fix mypy * Simplify glob_to_regex * Inline the glob_to_regex helper function Signed-off-by: Dan Callahan <danc@element.io> * Moar comments Signed-off-by: Dan Callahan <danc@element.io> Co-authored-by: Dan Callahan <danc@element.io>
* | Revert "improve efficiency of _glob_to_re"Brendan Abolivier2021-05-111-2/+1
| | | | | | | | This reverts commit edac710bc0c4dc1cd226d9ffe73a00b42c2b67d8.
* | Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixesAndrew Morgan2021-04-273-73/+105
|\|
| * Only store data in caches, not "smart" objects (#9845)Erik Johnston2021-04-231-69/+92
| |
| * Limit length of accepted email addresses (#9855)Erik Johnston2021-04-221-1/+8
| |
| * Port "Allow users to click account renewal links multiple times without ↵Andrew Morgan2021-04-191-3/+5
| | | | | | | | | | hitting an 'Invalid Token' page #74" from synapse-dinsic (#9832) This attempts to be a direct port of https://github.com/matrix-org/synapse-dinsic/pull/74 to mainline. There was some fiddling required to deal with the changes that have been made to mainline since (mainly dealing with the split of `RegistrationWorkerStore` from `RegistrationStore`, and the changes made to `self.make_request` in test code).
* | improve efficiency of _glob_to_reRichard van der Hoff2021-04-191-1/+2
| |
* | Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixesAndrew Morgan2021-04-1912-12/+0
|\|
| * Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-1412-12/+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>`
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesRichard van der Hoff2021-03-247-8/+8
|\|
| * Import HomeServer from the proper module. (#9665)Patrick Cloke2021-03-237-7/+7
| |
| * Fixed code misc. quality issues (#9649)Ankit Dobhal2021-03-221-1/+1
| | | | | | | | | | - Merge 'isinstance' calls. - Remove unnecessary dict call outside of comprehension. - Use 'sys.exit()' calls.
* | Merge branch 'develop' into matrix-org-hotfixesRichard van der Hoff2021-03-161-2/+2
|\|
| * Fix additional type hints from Twisted 21.2.0. (#9591)Patrick Cloke2021-03-121-2/+2
| |
* | Merge remote-tracking branch 'origin/release-v1.29.0' into matrix-org-hotfixesErik Johnston2021-03-041-2/+3
|\|
| * Fix additional type hints from Twisted upgrade. (#9518)Patrick Cloke2021-03-031-2/+3
| |
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesRichard van der Hoff2021-02-262-8/+28
|\|
| * Test that we require validated email for email pushers (#9496)Erik Johnston2021-02-251-0/+6
| |
| * Clean up `ShardedWorkerHandlingConfig` (#9466)Erik Johnston2021-02-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split ShardedWorkerHandlingConfig This is so that we have a type level understanding of when it is safe to call `get_instance(..)` (as opposed to `should_handle(..)`). * Remove special cases in ShardedWorkerHandlingConfig. `ShardedWorkerHandlingConfig` tried to handle the various different ways it was possible to configure federation senders and pushers. This led to special cases that weren't hit during testing. To fix this the handling of the different cases is moved from there and `generic_worker` into the worker config class. This allows us to have the logic in one place and allows the rest of the code to ignore the different cases.
| * Fix deleting pushers when using sharded pushers. (#9465)Erik Johnston2021-02-222-7/+19
| |
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesRichard van der Hoff2021-02-175-66/+214
|\|
| * Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-164-28/+37
| | | | | | | | | | | | | | - 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
| * Fix some typos.Patrick Cloke2021-02-121-1/+1
| |
| * Handle empty rooms when generating email notifications. (#9257)Patrick Cloke2021-02-041-37/+176
| | | | | | | | | | | | Fixes some exceptions if the room state isn't quite as expected. If the expected state events aren't found, try to find them in the historical room state. If they still aren't found, fallback to a reasonable, although ugly, value.
* | Merge remote-tracking branch 'origin/release-v1.27.0' into matrix-org-hotfixesErik Johnston2021-02-021-124/+189
|\|
| * Refactor email summary generation. (#9260)Patrick Cloke2021-02-011-122/+173
| | | | | | | | | | | | * Fixes a case where no summary text was returned. * The use of messages_from_person vs. messages_from_person_and_others was tweaked to depend on whether there was 1 sender or multiple senders, not based on if there was 1 room or multiple rooms.
| * Clean-up the template loading code. (#9200)Patrick Cloke2021-01-271-2/+16
| | | | | | | | | | * Enables autoescape by default for HTML files. * Adds a new read_template method for reading a single template. * Some logic clean-up.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2021-01-261-15/+11
|\|
| * Handle missing content keys when calculating presentable names. (#9165)Patrick Cloke2021-01-251-15/+11
| | | | | | | | Treat the content as untrusted and do not assume it is of the proper form.
* | Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixesErik Johnston2021-01-071-4/+8
|\|
| * Improve the performance of calculating ignored users in large rooms (#9024)Patrick Cloke2021-01-071-4/+8
| | | | | | | | | | | | This allows for efficiently finding which users ignore a particular user. Co-authored-by: Erik Johnston <erik@matrix.org>
* | Merge branch 'release-v1.25.0' of github.com:matrix-org/synapse into ↵Patrick Cloke2021-01-054-14/+7
|\| | | | | | | matrix-org-hotfixes