summary refs log tree commit diff
path: root/synapse/storage/databases/main/appservice.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Federation Sender & Appservice Pusher Stream Optimisations (#13251)Nick Mills-Barrett2022-07-151-40/+18
| | | | | | | | | | | | | * Replace `get_new_events_for_appservice` with `get_all_new_events_stream` The functions were near identical and this brings the AS worker closer to the way federation senders work which can allow for multiple workers to handle AS traffic. * Pull received TS alongside events when processing the stream This avoids an extra query -per event- when both federation sender and appservice pusher process events.
* Remove code which updates `application_services_state.last_txn` (#12680)Richard van der Hoff2022-05-171-23/+24
| | | | This column is unused as of #12209, so let's stop writing to it.
* Add some type hints to datastore (#12485)Dirk Klimpel2022-04-271-2/+2
|
* Add some type hints to datastore (#12423)Dirk Klimpel2022-04-121-10/+18
| | | | | | | | | | | | | | | | | | | * Add some type hints to datastore * newsfile * change `Collection` to `List` * refactor return type of `select_users_txn` * correct type hint in `stream.py` * Remove `Optional` in `select_users_txn` * remove not needed return type in `__init__` * Revert change in `get_stream_id_for_event_txn` * Remove import from `Literal`
* Use a sequence to generate AS transaction IDs, drop `last_txn` AS state (#12209)Nick Mills-Barrett2022-04-011-43/+19
| | | | | | | | Switching to a sequence means there's no need to track `last_txn` on the AS state table to generate new TXN IDs. This also means that there is no longer contention between the AS scheduler and AS handler on updates to the `application_services_state` table, which will prevent serialization errors during the complete AS txn transaction.
* Send device list updates to application services (MSC3202) - part 1 (#11881)Andrew Morgan2022-03-301-5/+9
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Start application service stream token tracking from 1 (#12193)Andrew Morgan2022-03-301-1/+2
| | | Co-authored-by: Erik Johnston <erik@matrix.org>
* Add support for MSC3202: sending one-time key counts and fallback key usage ↵reivilibre2022-02-241-2/+31
| | | | | 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-7/+17
| | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Include `prev_content` field in AS events (#11798)Vaishnav Nair2022-01-261-1/+1
| | | | | | * Include 'prev_content' field in AS events Signed-off-by: Vaishnav Nair <nairvaishnav007@icloud.com> Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
* Type hint the constructors of the data store classes (#11555)Sean Quah2021-12-131-3/+7
|
* Add type annotations to `tests.storage.test_appservice`. (#11488)reivilibre2021-12-021-3/+3
|
* Clarifications and small fixes to to-device related code (#11247)Andrew Morgan2021-11-091-4/+4
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* 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.
* Use inline type hints in `http/federation/`, `storage/` and `util/` (#10381)Jonathan de Jong2021-07-151-3/+1
|
* 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>`
* Import HomeServer from the proper module. (#9665)Patrick Cloke2021-03-231-1/+1
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-2/+1
| | | | | | | - 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 error handling around when completing an AS transaction (#8693)Brendan Abolivier2020-10-301-1/+1
|
* Add type hints to application services. (#8655)Patrick Cloke2020-10-281-38/+60
|
* Fix get|set_type_stream_id_for_appservice store functions (#8648)Will Hunt2020-10-261-7/+22
|
* Send some ephemeral events to appservices (#8437)Will Hunt2020-10-151-9/+57
| | | Optionally sends typing, presence, and read receipt information to appservices.
* 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 additional database code to async/await. (#8195)Patrick Cloke2020-08-281-9/+6
|
* Convert calls of async database methods to async (#8166)Patrick Cloke2020-08-271-4/+2
|
* Use the JSON encoder without whitespace in more places. (#8124)Patrick Cloke2020-08-201-3/+2
|
* Convert some of the general database methods to async (#8100)Patrick Cloke2020-08-171-1/+1
|
* Convert appservice, group server, profile and more databases to async (#8066)Patrick Cloke2020-08-121-21/+13
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-0/+374