summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha/sync.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Flatten the synapse.rest.client package (#10600)reivilibre2021-08-171-532/+0
|
* Always list fallback key types in /sync (#10623)Andrew Morgan2021-08-171-4/+5
|
* Merge branch 'master' into developErik Johnston2021-07-231-4/+7
|\
| * Always send device_one_time_keys_count (#10457)David Baker2021-07-221-4/+7
| | | | | | | | | | | | | | As per comment Fixes https://github.com/matrix-org/synapse/issues/10456 See also https://github.com/vector-im/element-android/issues/3725
* | Add a return type to parse_string. (#10438)Patrick Cloke2021-07-211-1/+1
|/ | | | And set the required attribute in a few places which will error if a parameter is not provided.
* Re-introduce "Leave out optional keys from /sync" change (#10214)Andrew Morgan2021-06-231-23/+46
| | | Required some fixes due to merge conflicts with #6739, but nothing too hairy. The first commit is the same as the original (after merge conflict resolution) then two more for compatibility with the latest sync code.
* Implement knock feature (#6739)Sorunome2021-06-091-10/+72
| | | | | | 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
* Revert "Leave out optional keys from /sync (#9919)" (#9940)Erik Johnston2021-05-061-44/+18
| | | This reverts commit e9eb3549d32a6f93d07de8dbd5e1ebe54c8d8278.
* Leave out optional keys from /sync (#9919)DeepBlueV7.X2021-05-051-18/+44
| | | | | | This leaves out all optional keys from /sync. This should be fine for all clients tested against conduit already, but it may break some clients, as such we should check, that at least most of them don't break horribly and maybe back out some of the individual changes. (We can probably always leave out groups for example, while the others may cause more issues.) Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
* 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>`
* Make it possible to use dmypy (#9692)Erik Johnston2021-03-261-0/+3
| | | | | | | | | Running `dmypy run` will do a `mypy` check while spinning up a daemon that makes rerunning `dmypy run` a lot faster. `dmypy` doesn't support `follow_imports = silent` and has `local_partial_types` enabled, so this PR enables those options and fixes the issues that were newly raised. Note that `local_partial_types` will be enabled by default in upcoming mypy releases.
* Add a type hints for service notices to the HomeServer object. (#9675)Patrick Cloke2021-03-241-3/+8
|
* Add admin API for logging in as a user (#8617)Erik Johnston2020-11-171-0/+1
|
* Add support for MSC2732: olm fallback keys (#8312)Hubert Chathi2020-10-061-0/+1
|
* Make token serializing/deserializing async (#8427)Erik Johnston2020-09-301-5/+5
| | | The idea is that in future tokens will encode a mapping of instance to position. However, we don't want to include the full instance name in the string representation, so instead we'll have a mapping between instance name and an immutable integer ID in the DB that we can use instead. We'll then do the lookup when we serialize/deserialize the token (we could alternatively pass around an `Instance` type that includes both the name and ID, but that turns out to be a lot more invasive).
* 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
* Re-implement unread counts (again) (#8059)Brendan Abolivier2020-09-021-0/+1
|
* Be stricter about JSON that is accepted by Synapse (#8106)Patrick Cloke2020-08-191-3/+2
|
* Revert #7736 (#8039)Brendan Abolivier2020-08-061-1/+0
|
* Re-implement unread counts (#7736)Brendan Abolivier2020-07-291-0/+1
|
* Skip serializing /sync response if client has disconnected (#7927)Richard van der Hoff2020-07-221-0/+6
| | | ... it's a load of work which may be entirely redundant.
* Add debugging to sync response generation (#7929)Richard van der Hoff2020-07-221-0/+3
|
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-1/+1
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Port rest.client.v2Erik Johnston2019-12-051-29/+25
|
* Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-311-1/+1
| | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* Address codestyle concernsMichael Kaye2019-10-241-1/+6
|
* Delay printf until logging is required.Michael Kaye2019-10-241-3/+3
| | | | | Using % will cause the string to be generated even if debugging is off.
* send 404 as http-status when filter-id is unknown to the server (#2380)krombel2019-10-101-17/+24
| | | | | | | This fixed the weirdness of 400 vs 404 as http status code in the case the filter id is not known by the server. As e.g. matrix-js-sdk expects 404 to catch this situation this leads to unwanted behaviour.
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-1/+1
| | | | | 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-26/+22
|
* Run Black. (#5482)Amber Brown2019-06-201-58/+71
|
* Unify v1 and v2 REST client APIs (#5226)Amber Brown2019-06-031-2/+2
|
* Don't bundle events in /sync or /eventsErik Johnston2019-05-211-0/+3
| | | | | As we'll send down the annotations too anyway, so this just ends up confusing clients.
* NewsfileErik Johnston2019-05-141-6/+6
|
* Allow client event serialization to be asyncErik Johnston2019-05-141-23/+24
|
* Allow "unavailable" presence status for /sync (#4592)Valentin Anger2019-02-081-1/+1
| | | | | | | | | | * Allow "unavailable" presence status for /sync Closes #3772, closes #3779 Signed-off-by: Valentin Anger <valentin.an.1999@gmail.com> * Add changelog for PR 4592
* Port rest/ to Python 3 (#3823)Amber Brown2018-09-121-1/+1
|
* Implement 'event_format' filter param in /syncRichard van der Hoff2018-09-041-13/+38
| | | | | This has been specced and part-implemented; let's implement it for /sync (but no other endpoints yet :/).
* initial cut at a room summary API (#3574)Matthew Hodgson2018-08-161-0/+1
|
* run isortAmber Brown2018-07-091-14/+13
|
* Attempt to be more performant on PyPy (#3462)Amber Brown2018-06-281-1/+1
|
* Stub out ServerNoticesSender on the workersRichard van der Hoff2018-05-221-0/+4
| | | | | ... and have the sync endpoints call it directly rather than obsure indirection via PresenceHandler
* Replace some ujson with simplejson to make it workErik Johnston2018-03-161-1/+1
|
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-1/+1
| | | | what could possibly go wrong
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/groups_mergedErik Johnston2017-09-191-2/+3
|\
| * Send down device list change notif when member leaves/rejoins roomErik Johnston2017-09-071-1/+2
| |
| * Reduce spammy log line in synchrotronsErik Johnston2017-08-021-1/+1
| |
* | Add groups to sync streamErik Johnston2017-07-201-0/+5
|/
* split out reducing stuff; just make encode_* staticKrombel2017-07-111-35/+27
|
* fix testKrombel2017-07-101-1/+3
|
* encode sync-response statically; omit empty objects from sync-responseKrombel2017-07-101-33/+48
|
* Add count of one time keys to sync streamErik Johnston2017-05-191-0/+1
|
* Fixed implementation errorsPablo Saavedra2017-05-151-0/+1
| | | | | * Added HS as property in SyncRestServlet * Fixed set_timeline_upper_limit function implementat¡ion
* Configurable maximum number of events requested by /sync and /messages (#2220)Pablo Saavedra2017-05-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the limit on the returned events in the timeline in the get and sync operations. The default value is -1, means no upper limit. For example, using `filter_timeline_limit: 5000`: POST /_matrix/client/r0/user/user:id/filter { room: { timeline: { limit: 1000000000000000000 } } } GET /_matrix/client/r0/user/user:id/filter/filter:id { room: { timeline: { limit: 5000 } } } The server cuts down the room.timeline.limit.
* Comment and remove spurious loggingErik Johnston2017-04-271-1/+0
|
* Fix invite state to always include all eventsErik Johnston2017-04-261-0/+2
|
* Remove unused importErik Johnston2017-03-151-1/+0
|
* Format presence events on the edges instead of reformatting them multiple timesErik Johnston2017-03-151-6/+13
|
* Add basic implementation of local device list changesErik Johnston2017-01-251-1/+5
|
* Glue only_event_fields into the sync rest servletKegan Dougal2016-11-221-10/+13
|
* Add store-and-forward direct-to-device messagingMark Haines2016-08-251-3/+6
|
* Don't change status_msg on /syncWill Hunt2016-08-101-1/+1
|
* Move SyncHandler out of the Handlers objectMark Haines2016-05-161-2/+1
|
* Move the presence handler out of the Handlers objectMark Haines2016-05-161-1/+1
|
* Use google style doc strings.Mark Haines2016-04-011-36/+43
| | | | | | | pycharm supports them so there is no need to use the other format. Might as well convert the existing strings to reduce the risk of people accidentally cargo culting the wrong doc string format.
* Deduplicate identical /sync requestsMark Haines2016-03-241-0/+3
|
* Initial cutErik Johnston2016-02-171-6/+10
|
* Add some paranoia loggingErik Johnston2016-02-111-0/+10
|
* Move state calculations from rest to handlerErik Johnston2016-02-011-75/+0
|
* Move logic from rest/ to handlers/Erik Johnston2016-01-251-34/+23
|
* Sanitize filtersErik Johnston2016-01-221-12/+12
|
* Whine if we give a from param to /syncErik Johnston2016-01-201-0/+7
|
* Only compute unread notifications for rooms we send down streamErik Johnston2016-01-191-2/+1
|
* Return highlight_count in /syncErik Johnston2016-01-191-0/+1
|
* Merge pull request #478 from matrix-org/daniel/userobjectDaniel Wagner-Hall2016-01-111-5/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a User object I'm sick of passing around more and more things as tuple items around the whole world, and needing to edit every call site every time there is more information about a user. So pass them around together as an object. This object has incredibly poorly named fields because we have a convention that `user` indicates a UserID object, and `user_id` indicates a string. I tried to clean up the whole repo to fix this, but gave up. So instead, I introduce a second convention. A user_object is a User, and a user_id_object is a UserId. I may have cried a little bit.
| * Introduce a Requester objectDaniel Wagner-Hall2016-01-111-5/+6
| | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #456 from matrix-org/store_event_actionsDavid Baker2016-01-081-0/+1
|\ \ | |/ |/| Send unread notification counts
| * Merge remote-tracking branch 'origin/develop' into store_event_actionsDavid Baker2016-01-061-6/+1
| |\
| * | Only joined rooms have unread_notif_countDavid Baker2016-01-041-1/+1
| | |
| * | Merge remote-tracking branch 'origin/develop' into store_event_actionsDavid Baker2015-12-221-1/+9
| |\ \
| * \ \ Merge remote-tracking branch 'origin/develop' into store_event_actionsDavid Baker2015-12-211-6/+21
| |\ \ \
| * | | | still very WIP, but now sends unread_notifications_count in the room object ↵David Baker2015-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | on sync (only actually corrrect in a full sync: hardcoded to 0 in incremental syncs).
* | | | | copyrightsMatthew Hodgson2016-01-071-1/+1
| |_|_|/ |/| | |
* | | | Guest users must be joined to a room to see it in /syncMark Haines2016-01-061-6/+1
| |_|/ |/| |
* | | Allow guest access if the user provides a list of rooms in the filterMark Haines2015-12-221-1/+9
| |/ |/|
* | Remove accidentally committed debug loggingMark Haines2015-12-211-1/+0
| |
* | Fix spacingMark Haines2015-12-141-1/+1
| |
* | Fix logging to lie lessMark Haines2015-12-141-2/+9
| |
* | Add commentary for fix in PR#442Mark Haines2015-12-141-0/+6
| |
* | Combine the prev content testsMark Haines2015-12-141-14/+12
| |
* | Check whether prev_content or prev_sender is set before trying to rollback stateMark Haines2015-12-141-8/+13
|/
* Allow filter JSON object in the filter query parameter in /syncMark Haines2015-12-091-9/+21
| | | | Documented by matrix-org/matrix-doc#224
* Add API for setting account_data globaly or on a per room basisMark Haines2015-12-011-0/+6
|
* Host /unstable and /r0 versions of r0 APIsDaniel Wagner-Hall2015-12-011-2/+2
|
* Merge branch 'develop' into rav/flatten_sync_responsePaul "LeoNerd" Evans2015-11-191-3/+3
|\
| * s/private_user_data/account_data/Mark Haines2015-11-181-3/+3
| |
* | Put back the 'state.events' subobjectRichard van der Hoff2015-11-191-1/+1
| | | | | | | | We're keeping 'events', in case we decide to add more keys later.
* | v2 /sync: Rename the keys of the 'rooms' object to match member statesRichard van der Hoff2015-11-191-3/+3
| | | | | | | | | | | | joined->join invited->invite archived->leave
* | Flatten the /sync response to remove the event_mapRichard van der Hoff2015-11-191-22/+13
|/
* Implementation of state rollback in /syncRichard van der Hoff2015-11-131-2/+65
| | | | | | | Implementation of SPEC-254: roll back the state dictionary to how it looked at the start of the timeline. Merged PR https://github.com/matrix-org/synapse/pull/373
* Make handlers.sync return a state dictionary, instead of an event list.Richard van der Hoff2015-11-131-1/+1
| | | | | | | | | Basically this moves the process of flattening the existing dictionary into a list up to rest.client.*, instead of doing it in handlers.sync. This simplifies a bit of the code in handlers.sync, but it is also going to be somewhat beneficial in the next stage of my hacking on SPEC-254. Merged from PR #371
* Update some commentsRichard van der Hoff2015-11-131-0/+56
| | | | | | | Add a couple of type annotations, docstrings, and other comments, in the interest of keeping track of what types I have. Merged from pull request #370.
* Allow guests to register and call /events?room_id=Daniel Wagner-Hall2015-11-041-1/+1
| | | | | | | 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.
* Include room tags in v2 /syncMark Haines2015-11-021-0/+5
|
* Implement full_state incremental syncRichard van der Hoff2015-10-261-2/+4
| | | | | | | | A hopefully-complete implementation of the full_state incremental sync, as specced at https://github.com/matrix-org/matrix-doc/pull/133. This actually turns out to be a relatively simple modification to the initial sync implementation.
* Merge pull request #319 from matrix-org/erikj/filter_refactorErik Johnston2015-10-221-2/+2
|\ | | | | Refactor api.filtering to have a Filter API
| * Refactor api.filtering to have a Filter APIErik Johnston2015-10-201-2/+2
| |
* | Add rooms that the user has left under archived in v2 sync.Mark Haines2015-10-191-6/+23
|/
* Include invites in incremental syncMark Haines2015-10-131-1/+1
|
* Include invited rooms in the initial syncMark Haines2015-10-131-1/+20
|
* Start spliting out the rooms into joined and invited in v2 syncMark Haines2015-10-131-9/+9
|
* Update the filters to match the latest spec.Mark Haines2015-10-121-15/+11
| | | | | Apply the filter the 'timeline' and 'ephemeral' keys of rooms. Apply the filter to the 'presence' key of a sync response.
* Set the user as online if they start polling the v2 syncMark Haines2015-10-091-3/+11
|
* Format the presence events correctly for v2Mark Haines2015-10-091-3/+9
|
* Update the v2 room sync format to match the current v2 specMark Haines2015-10-081-7/+7
|
* Update the sync response to match the latest specMark Haines2015-10-071-24/+22
|
* Move the rooms out into a room_map mapping from room_id to room.Mark Haines2015-10-051-13/+31
|
* Start updating the sync API to match the specificationMark Haines2015-10-011-53/+22
|
* Fix up one more referenceDaniel Wagner-Hall2015-08-251-3/+2
|
* Remove completely unused concepts from codebaseDaniel Wagner-Hall2015-08-251-1/+1
| | | | | | | | | | Removes device_id and ClientInfo device_id is never actually written, and the matrix.org DB has no non-null entries for it. Right now, it's just cluttering up code. This doesn't remove the columns from the database, because that's fiddly.
* Combine the request wrappers in rest/media/v1 and http/server into a single ↵Mark Haines2015-04-211-9/+11
| | | | wrapper decorator
* Fix code-styleMark Haines2015-02-101-1/+1
|
* Pass client info to the sync_configMark Haines2015-01-301-1/+1
|
* Filter the recent events before applying the limit when doing an incremental ↵Mark Haines2015-01-301-1/+1
| | | | sync with a gap
* Add basic filtering supportMark Haines2015-01-291-5/+14
|
* Move typing notifs to an "emphermal" event list on the room objectMark Haines2015-01-291-2/+2
|
* Add typing notifications to syncMark Haines2015-01-291-10/+8
|
* Include transaction ids in unsigned section of events in the sync results ↵Mark Haines2015-01-291-7/+16
| | | | for the clients that made those requests
* Add ports back to demo/start.shMark Haines2015-01-281-1/+1
|
* Fix FormattingMark Haines2015-01-271-3/+2
|
* Start implementing the non-incremental sync portion of the v2 /sync APIMark Haines2015-01-261-28/+77
|
* Start implementing the v2_alpha sync APIMark Haines2015-01-231-0/+143