summary refs log tree commit diff
path: root/tests/handlers/test_appservice.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug where redactions were not being sent over federation if we did not ↵Shay2022-10-111-7/+11
| | | | have the original event. (#13813)
* Accept & store thread IDs for receipts (implement MSC3771). (#13782)Patrick Cloke2022-09-231-0/+1
| | | | Updates the `/receipts` endpoint and receipt EDU handler to parse a `thread_id` from the body and insert it in the database.
* Federation Sender & Appservice Pusher Stream Optimisations (#13251)Nick Mills-Barrett2022-07-151-8/+8
| | | | | | | | | | | | | * 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 remaining bits of groups code. (#12936)Patrick Cloke2022-06-011-3/+0
| | | | | | * Update worker docs to remove group endpoints. * Removes an unused parameter to `ApplicationService`. * Break dependency between media repo and groups. * Avoid copying `m.room.related_groups` state events during room upgrades.
* Additional constants for EDU types. (#12884)Patrick Cloke2022-05-271-1/+2
| | | Instead of hard-coding strings in many places.
* Remove code which updates `application_services_state.last_txn` (#12680)Richard van der Hoff2022-05-171-10/+0
| | | | This column is unused as of #12209, so let's stop writing to it.
* Bound ephemeral events by key (#12544)Nick Mills-Barrett2022-04-261-0/+82
| | | | Co-authored-by: Brad Murray <bradtgmurray@gmail.com> Co-authored-by: Andrew Morgan <andrewm@element.io>
* Send device list updates to application services (MSC3202) - part 1 (#11881)Andrew Morgan2022-03-301-1/+120
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Rename various ApplicationServices interested methods (#11915)Andrew Morgan2022-03-031-14/+42
|
* Replace assertEquals and friends with non-deprecated versions. (#12092)Patrick Cloke2022-02-281-9/+9
|
* Add support for MSC3202: sending one-time key counts and fallback key usage ↵reivilibre2022-02-241-4/+190
| | | | | states to Application Services. (#11617) Co-authored-by: Erik Johnston <erik@matrix.org>
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-4/+6
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Send to-device messages to application services (#11215)Andrew Morgan2022-02-011-11/+270
| | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Clarifications and small fixes to to-device related code (#11247)Andrew Morgan2021-11-091-2/+6
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Add a linearizer on (appservice, stream) when handling ephemeral events. ↵Nick Barrett2021-11-031-0/+51
| | | | | (#11207) Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* Only return an appservice protocol if it has a service providing it. (#10532)Will Hunt2021-08-051-1/+121
| | | | | | If there are no services providing a protocol, omit it completely instead of returning an empty dictionary. This fixes a long-standing spec compliance bug.
* update black to 21.6b0 (#10197)Marcus2021-06-171-1/+1
| | | | | Reformat all files with the new version. Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
* Always update AS last_pos, even on no events (#10107)14mRh4X0r2021-06-071-4/+2
| | | | | | | | | | Fixes #1834. `get_new_events_for_appservice` internally calls `get_events_as_list`, which will filter out any rejected events. If all returned events are filtered out, `_notify_interested_services` will return without updating the last handled stream position. If there are 100 consecutive such events, processing will halt altogether. Breaking the loop is now done by checking whether we're up-to-date with `current_max` in the loop condition, instead of relying on an empty `events` list. Signed-off-by: Willem Mulder <14mRh4X0r@gmail.com>
* 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>`
* Use mock from the stdlib. (#9772)Patrick Cloke2021-04-091-1/+1
|
* Convert additional test-cases to homeserver test case. (#9396)Patrick Cloke2021-02-161-17/+16
| | | And convert some inlineDeferreds to async-friendly functions.
* Start fewer opentracing spans (#8640)Erik Johnston2020-10-261-12/+8
| | | | | | | #8567 started a span for every background process. This is good as it means all Synapse code that gets run should be in a span (unless in the sentinel logging context), but it means we generate about 15x the number of spans as we did previously. This PR attempts to reduce that number by a) not starting one for send commands to Redis, and b) deferring starting background processes until after we're sure they're necessary. I don't really know how much this will help.
* Fix not sending events over federation when using sharded event persisters ↵Erik Johnston2020-10-141-3/+10
| | | | | | | | | | | | | | | | | (#8536) * Fix outbound federaion with multiple event persisters. We incorrectly notified federation senders that the minimum persisted stream position had advanced when we got an `RDATA` from an event persister. Notifying of federation senders already correctly happens in the notifier, so we just delete the offending line. * Change some interfaces to use RoomStreamToken. By enforcing use of `RoomStreamTokens` we make it less likely that people pass in random ints that they got from somewhere random.
* Convert directory, e2e_room_keys, end_to_end_keys, monthly_active_users ↵Patrick Cloke2020-08-071-1/+1
| | | | database to async (#8042)
* Convert appservice to async. (#7973)Patrick Cloke2020-07-301-2/+3
|
* Convert the appservice handler to async/await. (#7775)Patrick Cloke2020-07-061-33/+35
|
* Run black.black2018-08-101-27/+12
|
* run isortAmber Brown2018-07-091-3/+5
|
* Fix testsErik Johnston2018-04-111-0/+1
|
* Fix appservice tests to account for new behavior of notify_interested_servicesIlya Zhuravlev2017-11-021-3/+12
|
* Make AppserviceHandler stream events from databaseErik Johnston2016-08-181-3/+6
| | | | | | | | | This is for two reasons: 1. Suppresses duplicates correctly, as the notifier doesn't do any duplicate suppression. 2. Makes it easier to connect the AppserviceHandler to the replication stream.
* Make notify_interested_services fasterErik Johnston2016-08-171-3/+10
|
* Update unit testsErik Johnston2016-08-171-0/+2
|
* Move the AS handler out of the Handlers object.Mark Haines2016-05-311-3/+3
| | | | | | Access it directly from the homeserver itself. It already wasn't inheriting from BaseHandler storing it on the Handlers object was already somewhat dubious.
* Fix flake8 warnings for testsMark Haines2016-02-191-2/+0
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Fix bug where synapse was sending AS user queries incorrectly.Kegan Dougal2015-06-171-0/+43
| | | | | | Bug introduced in 92b20713d7c6346aeb20dc09963081e472752bb5 which reversed the comparison when checking if a user existed in the users table. Added UTs to prevent this happening again.
* Use seconds; start gluing in the AS scheduler into the AS handler.Kegan Dougal2015-03-091-2/+5
|
* Dependency inject ApplicationServiceApi when creating ↵Kegan Dougal2015-02-051-7/+3
| | | | ApplicationServicesHandler.
* Fix unit tests.Kegan Dougal2015-02-051-2/+5
|
* Add unit test for appservice_handler.query_room_alias_existsKegan Dougal2015-02-051-1/+30
|
* Add unknown user ID check. Use store.get_aliases_for_room(room_id) when ↵Kegan Dougal2015-02-051-0/+1
| | | | searching for services by alias.
* Fix bug in store defer. Add more unit tests.Kegan Dougal2015-02-041-5/+1
|
* Begin to add unit tests for appservice glue and regex testing.Kegan Dougal2015-02-041-0/+68