summary refs log tree commit diff
path: root/synapse/appservice/api.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Return immutable objects for cachedList decorators (#16350)Patrick Cloke2023-09-191-3/+3
|
* Send the opentracing span information to appservices (#16227)Marcel2023-09-061-8/+24
|
* Move support for application service query parameter authorization behind a ↵Shay2023-08-031-9/+25
| | | | configuration option (#16017)
* Remove support for legacy application service paths (#15964)Shay2023-07-261-71/+11
|
* Stabilize MSC2659 support for AS ping endpoint. (#15528)Tulir Asokan2023-05-091-1/+1
|
* Add support for claiming multiple OTKs at once. (#15468)Patrick Cloke2023-04-271-9/+22
| | | | | | | MSC3983 provides a way to request multiple OTKs at once from appservices, this extends this concept to the Client-Server API. Note that this will likely be spit out into a separate MSC, but is currently part of MSC3983.
* Call appservices on modern paths, falling back to legacy paths. (#15317)Patrick Cloke2023-04-031-40/+93
| | | | | This uses the specced /_matrix/app/v1/... paths instead of the "legacy" paths. If the homeserver receives an error it will retry using the legacy path.
* Implement MSC3984 to proxy /keys/query requests to appservices. (#15321)Patrick Cloke2023-03-301-4/+50
| | | | | If enabled, for users which are exclusively owned by an application service then the appservice will be queried for devices in addition to any information stored in the Synapse database.
* Implement MSC3983 to proxy /keys/claim queries to appservices. (#15314)Patrick Cloke2023-03-281-0/+56
| | | | | | Experimental support for MSC3983 is behind a configuration flag. If enabled, for users which are exclusively owned by an application service then the appservice will be queried for one-time keys *if* there are none uploaded to Synapse.
* Implement MSC2659: application service ping endpoint (#15249)Tulir Asokan2023-03-161-0/+13
| | | Signed-off-by: Tulir Asokan <tulir@maunium.net>
* Type hints for tests.appservice (#14990)David Robertson2023-02-061-2/+12
| | | | | | | | | | | | | | | | | | | | * Accept a Sequence of events in synapse.appservice This avoids some casts/ignores in the tests I'm about to fixup. It seems that `List[Mock]` is not a subtype of `List[EventBase]`, but `Sequence[Mock]` is a subtype of `Sequence[EventBase]`. So presumably `Mock` is considered a subtype of anything, much like `Any`. * make tests.appservice.test_scheduler pass mypy * Extra hints in tests.appservice.test_scheduler * Extra hints in tests.appservice.test_api * Extra hints in tests.appservice.test_appservice * Disallow untyped defs * Changelog
* Use `device_one_time_keys_count` to match MSC3202 (#14565)Andrew Ferrazzutti2022-11-281-4/+7
| | | | | | | | | | | | | | | | | | | * Use `device_one_time_keys_count` to match MSC3202 Rename the `device_one_time_key_counts` key in responses to `device_one_time_keys_count` to match the name specified by MSC3202. Also change related variable/class names for consistency. Signed-off-by: Andrew Ferrazzutti <andrewf@element.io> * Update changelog.d/14565.misc * Revert name change for `one_time_key_counts` key as this is a different key altogether from `device_one_time_keys_count`, which is used for `/sync` instead of appservice transactions. Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Fix incorrectly sending authentication tokens to application service as ↵David Robertson2022-10-261-5/+7
| | | | headers (#14301)
* Send the appservice access token as a header. (#13996)Patrick Cloke2022-10-041-4/+19
| | | | | | | | | Implements MSC2832 by sending application service access tokens in the Authorization header. The access token is also still sent as a query parameter until the application service ecosystem has fully migrated to using headers. In the future this could be made opt-in, or removed completely.
* Add prometheus counters for content types other than events (#13175)Brad Murray2022-07-131-0/+14
|
* Add authentication to thirdparty bridge APIs (#12746)Will Hunt2022-05-241-3/+12
| | | Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
* Update mypy to 0.950 and fix complaints (#12650)David Robertson2022-05-061-1/+2
|
* MSC3202: Fix device_unused_fallback_keys -> device_unused_fallback_key_types ↵Will Hunt2022-04-221-1/+1
| | | | | | | (#12520) * Fix device_unused_fallback_keys -> device_unused_fallback_key_types * changelog
* Send device list updates to application services (MSC3202) - part 1 (#11881)Andrew Morgan2022-03-301-1/+9
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Use the proper serialization format when bundling aggregations. (#12090)Patrick Cloke2022-03-031-11/+13
| | | | This ensures that the `latest_event` field of the bundled aggregation for threads uses the same format as the other events in the response.
* Add support for MSC3202: sending one-time key counts and fallback key usage ↵reivilibre2022-02-241-2/+18
| | | | | states to Application Services. (#11617) Co-authored-by: Erik Johnston <erik@matrix.org>
* Send to-device messages to application services (#11215)Andrew Morgan2022-02-011-6/+23
| | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Add missing type hints to `synapse.appservice` (#11360)Patrick Cloke2021-12-141-13/+35
|
* Prevent historical state from being pushed to an application service via ↵Eric Eastwood2021-11-181-2/+21
| | | | | | | | | `/transactions` (MSC2716) (#11265) Mark historical state from the MSC2716 `/batch_send` endpoint as `historical` which makes it `backfilled` and have a negative `stream_ordering` so it doesn't get queried by `/transactions`. Fix https://github.com/matrix-org/synapse/issues/11241 Complement tests: https://github.com/matrix-org/complement/pull/221
* Add type hints for most `HomeServer` parameters (#11095)Sean Quah2021-10-221-1/+2
|
* Use inline type hints in various other places (in `synapse/`) (#10380)Jonathan de Jong2021-07-151-2/+2
|
* Implement knock feature (#6739)Sorunome2021-06-091-3/+8
| | | | | | This PR aims to implement the knock feature as proposed in https://github.com/matrix-org/matrix-doc/pull/2403 Signed-off-by: Sorunome mail@sorunome.de Signed-off-by: Andrew Morgan andrewm@element.io
* 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>`
* Add ResponseCache tests. (#9458)Jonathan de Jong2021-03-081-1/+1
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-1/+3
| | | | | | | - 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
* Remove unneeded type constraints on 3rd party protocol lookup responsesBrendan Abolivier2021-02-091-3/+0
|
* Send some ephemeral events to appservices (#8437)Will Hunt2020-10-151-8/+19
| | | Optionally sends typing, presence, and read receipt information to appservices.
* Add type hints to response cache. (#8507)Patrick Cloke2020-10-091-2/+2
|
* Add type annotations to SimpleHttpClient (#8372)Richard van der Hoff2020-09-241-1/+1
|
* 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
* Convert appservice code to async/await. (#8207)Patrick Cloke2020-09-011-8/+11
|
* Convert the SimpleHttpClient to async. (#8016)Patrick Cloke2020-08-041-1/+1
|
* Convert appservice to async. (#7973)Patrick Cloke2020-07-301-13/+8
|
* Include room states on invite events sent to ASes (#6455)Sorunome2020-07-101-4/+16
|
* Convert the appservice handler to async/await. (#7775)Patrick Cloke2020-07-061-1/+0
|
* Replace all remaining six usage with native Python 3 equivalents (#7704)Dagfinn Ilmari Mannsåker2020-06-161-2/+1
|
* Clean up newline quote marks around the codebase (#6362)Andrew Morgan2019-11-211-1/+1
|
* Remove double return statements (#5962)Andrew Morgan2019-09-031-3/+0
| | | | | | | | | | Remove all the "double return" statements which were a result of us removing all the instances of ``` defer.returnValue(...) return ``` statements when we switched to python3 fully.
* Replace returnValue with return (#5736)Amber Brown2019-07-231-19/+19
|
* Run Black. (#5482)Amber Brown2019-06-201-40/+26
|
* Port http/ to Python 3 (#3771)Amber Brown2018-09-061-6/+7
|
* run isortAmber Brown2018-07-091-7/+7
|
* Let's try labels instead of label, that might workWill Hunt2018-06-051-3/+3
|
* Add metrics to track appservice transactionsWill Hunt2018-06-051-0/+22
|
* Refactor ResponseCache usageRichard van der Hoff2018-04-121-7/+1
| | | | | | | | | | | | | | | Adds a `.wrap` method to ResponseCache which wraps up the boilerplate of a (get, set) pair, and then use it throughout the codebase. This will be largely non-functional, but does include the following functional changes: * federation_server.on_context_state_request: drops use of _server_linearizer which looked redundant and could cause incorrect cache misses by yielding between the get and the set. * RoomListHandler.get_remote_public_room_list(): fixes logcontext leaks * the wrap function includes some logging. I'm hoping this won't be too noisy on production.
* Add metrics for ResponseCacheRichard van der Hoff2018-04-101-1/+2
|
* Do logcontexts outside ResponseCacheErik Johnston2017-10-251-3/+7
|
* Rename network_id to instance_id on client sideErik Johnston2016-12-121-1/+1
|
* Don't include appservice idErik Johnston2016-12-061-1/+0
|
* Add new API appservice specific public room listErik Johnston2016-12-061-0/+9
|
* Log if rejecting 3PE query metadata result due to type checkPaul "LeoNerd" Evans2016-09-091-4/+11
|
* Reject malformed 3PE query metadata results earlier in AS API handling codePaul "LeoNerd" Evans2016-09-091-2/+10
|
* Use None instead of the empty stringKegan Dougal2016-08-301-5/+5
| | | | Change how we validate the 'url' field as a result.
* Flake8Kegan Dougal2016-08-301-0/+1
|
* Allow application services to have an optional 'url'Kegan Dougal2016-08-301-0/+11
| | | | | | If 'url' is not specified, they will not be pushed for events or queries. This is useful for bots who simply wish to reserve large chunks of user/alias namespace, and don't care about being pushed for events.
* Just sprintf the 'kind' argument into uri directlyPaul "LeoNerd" Evans2016-08-251-3/+1
|
* Move ThirdPartyEntityKind into api.constants so the expectation becomes that ↵Paul "LeoNerd" Evans2016-08-251-1/+1
| | | | the value is significant
* Root the 3PE lookup API within /_matrix/app/unstable instead of at toplevelPaul "LeoNerd" Evans2016-08-251-3/+16
|
* appease pep8Paul "LeoNerd" Evans2016-08-251-3/+2
|
* Implement a ResponseCache around 3PE lookup metadata lookupsPaul "LeoNerd" Evans2016-08-251-11/+21
|
* Kill PROTOCOL_META since I'm not using it any morePaul "LeoNerd" Evans2016-08-251-7/+0
|
* Actually query over AS API for 3PE lookup metadataPaul "LeoNerd" Evans2016-08-251-0/+20
|
* Move 3PU/3PL lookup APIs into /thirdparty containing entityPaul "LeoNerd" Evans2016-08-241-2/+2
|
* Move validation logic for AS 3PE query response into ApplicationServiceApi ↵Paul "LeoNerd" Evans2016-08-181-1/+42
| | | | class, to keep the handler logic neater
* Avoid so much copypasta between 3PU and 3PL query by unifying around a ↵Paul "LeoNerd" Evans2016-08-181-14/+11
| | | | ThirdPartyEntityKind enumeration
* Minor syntax neateningsPaul "LeoNerd" Evans2016-08-181-2/+2
|
* Copypasta the 3PU support code to also do 3PLPaul "LeoNerd" Evans2016-08-181-0/+11
|
* Since empty lookups now return 200/empty list not 404, we can safely log ↵Paul "LeoNerd" Evans2016-08-181-3/+2
| | | | failures as exceptions
* Don't catch the return-value-as-exception that @defer.inlineCallbacks will usePaul "LeoNerd" Evans2016-08-181-1/+1
|
* Actually make 3PU lookup calls out to ASesPaul "LeoNerd" Evans2016-08-181-1/+10
|
* Thread 3PU lookup through as far as the AS API object; which currently noöps itPaul "LeoNerd" Evans2016-08-171-0/+3
|
* Remove some unused functions (#711)Mark Haines2016-04-081-5/+0
| | | | | | | | * Remove some unused functions * get_room_events_stream is only used in tests * is_exclusive_room might actually be something we want
* Fix flake8 warnings for new flake8Daniel Wagner-Hall2016-02-021-1/+1
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Fix remaining scheduler bugs. Add more informative logging.Kegan Dougal2015-03-101-5/+3
|
* Bug fixes whilst putting it all togetherKegan Dougal2015-03-091-0/+1
|
* Add txn_id kwarg to push methodsKegan Dougal2015-03-051-4/+9
|
* Minor tweaks based on PR feedback.Kegan Dougal2015-02-111-3/+3
|
* PEP8-ifyKegan Dougal2015-02-111-2/+0
|
* Fix bugs so lazy room joining works as intended.Kegan Dougal2015-02-091-3/+3
|
* Serialize events before sending to ASesKegan Dougal2015-02-051-0/+10
|
* Glue AS work to general event notifications. Add more exception handling ↵Kegan Dougal2015-02-051-1/+10
| | | | when poking ASes.
* Add hs_token column and generate a different token f.e application service.Kegan Dougal2015-02-051-4/+4
|
* Impl push_bulk functionKegan Dougal2015-02-051-1/+18
|
* Update user/alias query APIs to use new format of SimpleHttpClient.get_jsonKegan Dougal2015-02-041-8/+7
|
* Add query_user/alias APIs.Kegan Dougal2015-02-041-4/+43
|
* Add stub ApplicationServiceApi and glue it with the handler.Kegan Dougal2015-02-041-0/+21
|
* Add appservice package and move ApplicationService into it.Kegan Dougal2015-02-031-0/+15