summary refs log tree commit diff
path: root/synapse/rest/client/v1/push_rule.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Flatten the synapse.rest.client package (#10600)reivilibre2021-08-171-354/+0
|
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Remove unused OPTIONS handlers. (#8621)Patrick Cloke2020-10-221-3/+0
| | | | The handling of OPTIONS requests was consolidated in #7534, but the endpoint specific handlers were not removed.
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-1/+1
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Don't remember `enabled` of deleted push rules and properly return 404 for ↵reivilibre2020-09-091-2/+13
| | | | | | | missing push rules in `.../actions` and `.../enabled` (#7796) Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Remove `ChainedIdGenerator`. (#8123)Erik Johnston2020-08-191-1/+1
| | | | | It's just a thin wrapper around two ID gens to make `get_current_token` and `get_next` return tuples. This can easily be replaced by calling the appropriate methods on the underlying ID gens directly.
* Convert pusher databases to async/await. (#8075)Patrick Cloke2020-08-141-4/+5
|
* Incorporate reviewBrendan Abolivier2020-08-061-2/+2
|
* Fix PUT /pushrules to use the right rule IDsBrendan Abolivier2020-08-031-2/+9
|
* Back out MSC2625 implementation (#7761)Brendan Abolivier2020-07-011-2/+2
|
* Use temporary prefixes as per the MSCBrendan Abolivier2020-06-101-1/+1
|
* Rename dont_push into mark_unreadBrendan Abolivier2020-06-101-2/+2
|
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-3/+3
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Port rest/v1 to async/awaitErik Johnston2019-12-051-14/+10
|
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-5/+5
| | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* Replace returnValue with return (#5736)Amber Brown2019-07-231-5/+5
|
* Run Black. (#5482)Amber Brown2019-06-201-69/+50
|
* Unify v1 and v2 REST client APIs (#5226)Amber Brown2019-06-031-6/+6
|
* Remove usage of request.postpathErik Johnston2019-04-161-8/+8
| | | | | | | This is an undocumented variable in twisted, and relies on the servlet being mounted in the right way. This also breaks getting push rules on workers.
* Only handle GET requests for /push_rulesErik Johnston2019-04-151-0/+7
|
* Fix non-ASCII pushrules (#4248)Amber Brown2018-12-041-12/+23
|
* Port rest/ to Python 3 (#3823)Amber Brown2018-09-121-12/+12
|
* Fix develop because I broke it :( (#3535)Amber Brown2018-07-141-2/+2
|
* Use parse_{int,str} and assert from http.servletKrombel2018-07-131-3/+3
| | | | | | | parse_integer and parse_string can take a request and raise errors in case we have wrong or missing params. This PR tries to use them more to deduplicate some code and make it better readable
* run isortAmber Brown2018-07-091-7/+9
|
* Load push rules in storage layer, so that they get cachedErik Johnston2016-06-031-4/+2
|
* Fix regression where synapse checked whether push rules were valid JSON ↵Mark Haines2016-03-141-2/+2
| | | | before the compatibility hack that handled clients sending invalid JSON
* Add a parse_json_object functionMark Haines2016-03-091-13/+3
| | | | | to deduplicate all the copy+pasted _parse_json functions. Also document the parse_.* functions.
* Hook up the push rules stream to account_data in /syncMark Haines2016-03-041-1/+1
|
* Move the code for formatting push rules into a separate functionMark Haines2016-03-031-86/+4
|
* Hook up the push rules to the notifierMark Haines2016-03-031-15/+29
|
* Add support for changing the actions for default rulesMark Haines2016-02-261-4/+27
| | | | | | See matrix-org/matrix-doc#283 Works by adding dummy rules to the push rules table with a negative priority class and then using those rules to clobber the default rule actions when adding the default rules in ``list_with_base_rules``
* Make sure we return a JSON object when returning the values of specif…Mark Haines2016-02-251-1/+3
| | | | …ic keys from a push rule
* Remove unused get_rule_attr methodMark Haines2016-02-241-8/+0
|
* Remove dead code for setting device specific rules.Mark Haines2016-02-181-85/+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 typo in request validation for adding push rules.Mark Haines2016-02-161-1/+1
|
* Fix adding push rules relative to other rulesMark Haines2016-01-271-5/+10
|
* Add missing yield in push_rules set enabledMark Haines2016-01-251-2/+2
|
* Take a deepcopy of push rules before mutating themErik Johnston2016-01-191-1/+3
|
* Use static for const dictsErik Johnston2016-01-181-1/+7
|
* Remove internal idsErik Johnston2016-01-181-0/+4
|
* Fix enabling & disabling push rulesDavid Baker2016-01-141-1/+1
|
* Rename 'user_name' to 'user_id' in push to make it consistent with the rest ↵Mark Haines2016-01-131-5/+5
| | | | of the code
* Introduce a Requester objectDaniel Wagner-Hall2016-01-111-6/+7
| | | | | | | | | This tracks data about the entity which made the request. This is instead of passing around a tuple, which requires call-site modifications every time a new piece of optional context is passed around. I tried to introduce a User object. I gave up.
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Take object not boolDaniel Wagner-Hall2015-12-071-0/+5
| | | | | | Allows bool as legacy fallback See https://github.com/matrix-org/matrix-doc/pull/212
* Host /unstable and /r0 versions of r0 APIsDaniel Wagner-Hall2015-12-011-2/+2
|
* Allow guests to register and call /events?room_id=Daniel Wagner-Hall2015-11-041-3/+3
| | | | | | | This follows the same flows-based flow as regular registration, but as the only implemented flow has no requirements, it auto-succeeds. In the future, other flows (e.g. captcha) may be required, so clients should treat this like the regular registration flow choices.
* SYN-390: Don't modify the dictionary returned from the data storeMark Haines2015-05-261-5/+8
|
* Add the master push rule for the break-my-push button. Allow server default ↵David Baker2015-03-101-1/+4
| | | | rules to be disabled by default.
* s/user_name/user/ as per mjark's commentDavid Baker2015-03-021-3/+3
|
* Oops, missed a replacement.David Baker2015-03-021-1/+1
|
* Blank linesDavid Baker2015-03-021-0/+1
|
* It's set_tweak now, not set_soundDavid Baker2015-02-271-1/+1
|
* Add API for getting/setting enabled-ness of push rules.David Baker2015-02-261-5/+49
|
* SYWEB-278 Don't allow rules with no rule_id.David Baker2015-02-251-1/+1
|
* Blunty replace json with simplejsonErik Johnston2015-02-111-1/+1
|
* Code-style fixesMark Haines2015-02-101-5/+13
|
* priority class now dealt with in namespaced rule_idDavid Baker2015-02-051-4/+0
|
* Give server default rules the 'default' attribute and fix various brokenness.David Baker2015-02-051-1/+3
|
* Server default rules now of all kinds rather than all being at lowest prio.David Baker2015-02-051-39/+32
|
* namespace rule IDs to be unique within their scope and rule type.David Baker2015-02-051-123/+129
|
* More s/instance_handle/profile_tag/David Baker2015-02-041-5/+5
|
* s/instance_handle/profile_tag/David Baker2015-02-031-14/+14
|
* Spit out server default rules too.David Baker2015-01-301-4/+12
|
* Add glob asterisks when running rules.David Baker2015-01-301-4/+1
| | | | | | Means that now you can't do exact matches even in override rules, but I think we can live with that. Advantage is that you'll now always get back what was put in to the API.
* Renumber priority classes so we can use 0 for defaults.David Baker2015-01-291-5/+5
|
* Code style fixes.Mark Haines2015-01-291-7/+22
|
* Change uses of get_user_by_req because it returns a tuple now.David Baker2015-01-281-3/+3
|
* spacesDavid Baker2015-01-281-2/+2
|
* Unnecessary newlines.David Baker2015-01-281-5/+0
|
* Unnecessary newline.David Baker2015-01-281-1/+0
|
* Better styleDavid Baker2015-01-281-2/+5
|
* Another superfluous newlineDavid Baker2015-01-281-1/+0
|
* Ah, the comma of doom.David Baker2015-01-281-1/+1
|
* Brackets are nicerDavid Baker2015-01-281-2/+2
|
* Oops, bad merge: needed to change the base class of the rest servlets too.David Baker2015-01-281-2/+2
|
* Add API to delete push rules.David Baker2015-01-231-1/+40
|
* Use push settings!David Baker2015-01-231-14/+29
|
* more pep8David Baker2015-01-231-2/+4
|
* Make string format tuple an actual tupleDavid Baker2015-01-231-1/+1
|
* redundant parensDavid Baker2015-01-231-1/+1
|
* stray spaceDavid Baker2015-01-231-1/+1
|
* make per-device rules workDavid Baker2015-01-231-5/+15
|
* Add slightly pedantic trailing slash error.David Baker2015-01-231-2/+13
|
* Fix adding rules without before/after & add the rule that we couldn't find ↵David Baker2015-01-231-2/+2
| | | | to the error
* This really serves me right for ever making a map called 'map'.David Baker2015-01-231-1/+1
|
* As yet fairly untested GET API for push rulesDavid Baker2015-01-221-10/+128
|
* Merge branch 'develop' into pushersDavid Baker2015-01-221-0/+195
Conflicts: synapse/rest/__init__.py