Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Implement push rule evaluation in Rust. (#13838) | Erik Johnston | 2022-09-29 | 1 | -361/+0 |
| | |||||
* | fix: Push notifications for invite over federation (#13719) | Kateřina Churanová | 2022-09-28 | 1 | -8/+8 |
| | |||||
* | Make push rules use proper structures. (#13522) | Erik Johnston | 2022-08-16 | 1 | -8/+19 |
| | | | | | | | | | | | | 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. | ||||
* | Experimental support for MSC3772 (#12740) | Patrick Cloke | 2022-05-24 | 1 | -1/+49 |
| | | | | | | | | | | 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. | ||||
* | Move free functions into PushRuleEvaluatorForEvent. (#12677) | Patrick Cloke | 2022-05-10 | 1 | -4/+66 |
| | | | | | | * Move `_condition_checker` into `PushRuleEvaluatorForEvent`. * Move the condition cache into `PushRuleEvaluatorForEvent`. * Improve docstrings. * Inline a method which is only called once. | ||||
* | Fix `PushRuleEvaluator` and `Filter` to work on frozendicts (#12100) | Richard van der Hoff | 2022-02-28 | 1 | -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. | ||||
* | Re-apply: Move glob_to_regex and re_word_boundary to matrix-python-common ↵ | reivilibre | 2022-01-05 | 1 | -3/+4 |
| | | | | | #11505 (#11687) Co-authored-by: Sean Quah <seanq@element.io> | ||||
* | Revert "Move `glob_to_regex` and `re_word_boundary` to ↵ | Sean Quah | 2021-12-07 | 1 | -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 Quah | 2021-12-06 | 1 | -3/+4 |
| | |||||
* | Add remaining type hints to `synapse.events`. (#11098) | Patrick Cloke | 2021-11-02 | 1 | -5/+5 |
| | |||||
* | Use inline type hints in various other places (in `synapse/`) (#10380) | Jonathan de Jong | 2021-07-15 | 1 | -2/+2 |
| | |||||
* | Merge pull request from GHSA-x345-32rc-8h85 | Richard van der Hoff | 2021-05-11 | 1 | -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> | ||||
* | 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>` | ||||
* | Add type hints to the push module. (#8901) | Patrick Cloke | 2020-12-11 | 1 | -6/+22 |
| | |||||
* | Apply suggestions from code review | Richard van der Hoff | 2020-10-16 | 1 | -1/+1 |
| | | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | type annotations for LruCache | Richard van der Hoff | 2020-10-16 | 1 | -7/+9 |
| | |||||
* | Make LruCache register its own metrics (#8561) | Richard van der Hoff | 2020-10-16 | 1 | -3/+1 |
| | | | | | rather than have everything that instantiates an LruCache manage metrics separately, have LruCache do it itself. | ||||
* | Enable mypy checking for unreachable code and fix instances. (#8432) | Patrick Cloke | 2020-10-01 | 1 | -2/+2 |
| | |||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -1/+1 |
| | |||||
* | Don't ignore `set_tweak` actions with no explicit `value`. (#7766) | reivilibre | 2020-07-06 | 1 | -4/+27 |
| | | | | | | | | | | | | | | * Fix spec compliance; tweaks without values are valid (default to True, which is only concretely specified for `highlight`, but it seems only reasonable to generalise) * Changelog for 7766. * Add documentation to `tweaks_for_actions` May as well tidy up when I'm here. * Add a test for `tweaks_for_actions` | ||||
* | Replace all remaining six usage with native Python 3 equivalents (#7704) | Dagfinn Ilmari Mannsåker | 2020-06-16 | 1 | -3/+1 |
| | |||||
* | Ensure the body is a string before comparing push rules. (#7701) | Patrick Cloke | 2020-06-15 | 1 | -2/+2 |
| | |||||
* | Allow configuration of Synapse's cache without using synctl or environment ↵ | Amber Brown | 2020-05-11 | 1 | -2/+2 |
| | | | | variables (#6391) | ||||
* | Do not treat display names as globs for push rules. (#7271) | Patrick Cloke | 2020-04-16 | 1 | -30/+39 |
| | |||||
* | Remove usage of deprecated logger.warn method from codebase (#6271) | Andrew Morgan | 2019-10-31 | 1 | -2/+2 |
| | | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated. | ||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -31/+26 |
| | |||||
* | Clean up event accesses and tests | Erik Johnston | 2018-11-02 | 1 | -2/+2 |
| | | | | | This is in preparation to refactor FrozenEvent to support different event formats for different room versions | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -2/+2 |
| | |||||
* | Merge remote-tracking branch 'origin/develop' into 3218-official-prom | Amber Brown | 2018-05-28 | 1 | -1/+3 |
|\ | |||||
| * | Replace some more comparisons with six | Adrian Tschira | 2018-05-19 | 1 | -1/+3 |
| | | | | | | | | | | | | plus a bonus b"" string I missed last time Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | | replacing portions | Amber Brown | 2018-05-21 | 1 | -1/+1 |
|/ | |||||
* | pep8 | David Baker | 2017-10-10 | 1 | -1/+1 |
| | |||||
* | Use notification levels in power_levels | David Baker | 2017-10-10 | 1 | -6/+14 |
| | | | | | | Rather than making the condition directly require a specific power level. This way the level require to notify a room can be configured per room. | ||||
* | What year is it!? Who's the president!? | David Baker | 2017-10-10 | 1 | -1/+1 |
| | |||||
* | pep8 | David Baker | 2017-10-05 | 1 | -0/+3 |
| | |||||
* | Support for channel notifications | David Baker | 2017-10-05 | 1 | -7/+18 |
| | | | | | Add condition type to check the sender's power level and add a base rule using it for @channel notifications. | ||||
* | Use better method for word boundary searching | David Baker | 2017-10-05 | 1 | -11/+3 |
| | | | | From https://github.com/matrix-org/matrix-js-sdk/commit/ebc95667b8a5777d13e5d3c679972bedae022fd5 | ||||
* | pep8 | David Baker | 2017-10-05 | 1 | -0/+1 |
| | |||||
* | Fix notif kws that start/end with non-word chars | David Baker | 2017-10-05 | 1 | -2/+21 |
| | | | | | | | Only prepend / append word bounary characters if the search expression starts or ends with a word character, otherwise they don't work because there's no word bounary between whitespace and a non-word char. | ||||
* | Fix caching error in the push evaluator | Richard van der Hoff | 2017-07-05 | 1 | -1/+3 |
| | | | | | | | | | | Initialising `result` to `{}` in the parameters meant that every call to _flatten_dict used the *same* target dictionary. I'm hopeful this will fix https://github.com/matrix-org/synapse/issues/2270, but I suspect it won't. (This code seems to have been here since forever, unlike the bug, and I don't really think it explains the observed behaviour). Still, it makes it hard to investigate the problem. | ||||
* | Cache glob to regex at a higher level for push | Erik Johnston | 2017-03-29 | 1 | -47/+57 |
| | |||||
* | Remove code that's now been obsoleted or moved elsewhere | David Baker | 2016-04-07 | 1 | -126/+8 |
| | |||||
* | Don't ignore the obey overlay if the rule has an enabled attribute of False | David Baker | 2016-03-31 | 1 | -2/+3 |
| | | | | Fixes https://github.com/vector-im/vector-web/issues/1244 | ||||
* | Fix relative imports so they work in both py3 and py27 | Mark Haines | 2016-03-08 | 1 | -2/+2 |
| | |||||
* | Remove dead code for setting device specific rules. | Mark Haines | 2016-02-18 | 1 | -10/+5 |
| | | | | | | It wasn't possible to hit the code from the API because of a typo in parsing the request path. Since no-one was using the feature we might as well remove the dead code. | ||||
* | Fix flake8 warnings for new flake8 | Daniel Wagner-Hall | 2016-02-02 | 1 | -1/+1 |
| | |||||
* | Change regex cache size to 5000 | Erik Johnston | 2016-01-19 | 1 | -1/+1 |
| | |||||
* | Add regex cache. Only caculate push actions for users that have sent read ↵ | Erik Johnston | 2016-01-19 | 1 | -3/+17 |
| | | | | receipts, and are on that server | ||||
* | Handle glob -> regex errors | Erik Johnston | 2016-01-19 | 1 | -29/+33 |
| | |||||
* | Preserve truthiness | Erik Johnston | 2016-01-18 | 1 | -1/+2 |
| | |||||
* | You need to escape backslashes | Erik Johnston | 2016-01-18 | 1 | -2/+2 |
| | |||||
* | Fix branch didn't check word_boundary | Erik Johnston | 2016-01-18 | 1 | -3/+9 |
| | |||||
* | Don't split at word boundaries, actually use regex | Erik Johnston | 2016-01-18 | 1 | -62/+47 |
| | |||||
* | Drop log levels | Erik Johnston | 2016-01-18 | 1 | -2/+2 |
| | |||||
* | Add comments and remove dead code | Erik Johnston | 2016-01-18 | 1 | -12/+11 |
| | |||||
* | Use static for const dicts | Erik Johnston | 2016-01-18 | 1 | -6/+14 |
| | |||||
* | Don't edit ruleset | Erik Johnston | 2016-01-18 | 1 | -5/+4 |
| | |||||
* | Make notifications go quicker | Erik Johnston | 2016-01-18 | 1 | -76/+150 |
| | |||||
* | Rename 'user_name' to 'user_id' in push to make it consistent with the rest ↵ | Mark Haines | 2016-01-13 | 1 | -12/+12 |
| | | | | of the code | ||||
* | Merge pull request #456 from matrix-org/store_event_actions | David Baker | 2016-01-08 | 1 | -7/+15 |
|\ | | | | | Send unread notification counts | ||||
| * | Add bulk push rule evaluator which actually still evaluates rules one by ↵ | David Baker | 2015-12-22 | 1 | -5/+8 |
| | | | | | | | | one, but does far fewer db queries to fetch the rules | ||||
| * | Store nothing instead of ['dont_notify'] for events with no notification ↵ | David Baker | 2015-12-10 | 1 | -2/+7 |
| | | | | | | | | required: much as it would be nice to be able to tell between the event not having been processed and there being no notification for it, this isn't worth filling up the table with ['dont_notify'] I think. Consequently treat the empty actions array as dont_notify and filter dont_notify out of the result. | ||||
* | | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
|/ | |||||
* | Split out the push rule evaluator into a separate file so it can be more ↵ | David Baker | 2015-12-09 | 1 | -0/+224 |
readily reused. Should be functionally identical. |