Commit Graph

186 Commits

Author SHA1 Message Date
David Baker eb03625626 Merge remote-tracking branch 'origin/develop' into store_event_actions 2016-01-05 18:39:50 +00:00
Daniel Wagner-Hall cfd07aafff Allow guests to upgrade their accounts 2016-01-05 18:01:18 +00:00
David Baker c77e7e60fc Only joined rooms have unread_notif_count 2016-01-04 15:49:06 +00:00
David Baker 140a50f641 Merge remote-tracking branch 'origin/develop' into store_event_actions 2015-12-22 17:23:35 +00:00
Mark Haines 45a9e0ae0c Allow guest access if the user provides a list of rooms in the filter 2015-12-22 10:25:46 +00:00
David Baker c061b47c57 Merge remote-tracking branch 'origin/develop' into store_event_actions 2015-12-21 15:30:26 +00:00
Mark Haines 64b6606824 Remove accidentally committed debug logging 2015-12-21 15:22:03 +00:00
David Baker 42ad49f5b7 still very WIP, but now sends unread_notifications_count in the room object on sync (only actually corrrect in a full sync: hardcoded to 0 in incremental syncs). 2015-12-16 18:42:09 +00:00
Mark Haines 3ddf0b9722 Fix spacing 2015-12-14 15:20:59 +00:00
Mark Haines 2acae8300f Fix logging to lie less 2015-12-14 15:19:37 +00:00
Mark Haines 28c5181dfe Add commentary for fix in PR#442 2015-12-14 14:50:51 +00:00
Mark Haines 070e28e203 Combine the prev content tests 2015-12-14 14:34:04 +00:00
Mark Haines 834924248f Check whether prev_content or prev_sender is set before trying to rollback state 2015-12-14 14:09:21 +00:00
Mark Haines e4bfe50e8f Allow filter JSON object in the filter query parameter in /sync
Documented by matrix-org/matrix-doc#224
2015-12-09 12:56:50 +00:00
Daniel Wagner-Hall 7a8ba4c9a0 Actually host r0 and unstable prefixes 2015-12-08 15:26:52 +00:00
Daniel Wagner-Hall 872c134807 Update endpoints to reflect current spec 2015-12-02 15:45:04 +00:00
Mark Haines 95f30ecd1f Add API for setting account_data globaly or on a per room basis 2015-12-01 18:41:32 +00:00
Daniel Wagner-Hall 14d7acfad4 Host /unstable and /r0 versions of r0 APIs 2015-12-01 17:34:32 +00:00
Paul "LeoNerd" Evans dd11bf8a79 Merge branch 'develop' into rav/flatten_sync_response 2015-11-19 17:21:03 +00:00
Richard van der Hoff f6e092f6cc Put back the 'state.events' subobject
We're keeping 'events', in case we decide to add more keys later.
2015-11-19 12:23:42 +00:00
Richard van der Hoff 24ae0eee8e v2 /sync: Rename the keys of the 'rooms' object to match member states
joined->join
invited->invite
archived->leave
2015-11-19 10:51:12 +00:00
Richard van der Hoff 3c3fc6b268 Flatten the /sync response to remove the event_map 2015-11-19 10:51:11 +00:00
Mark Haines 1c960fbb80 s/private_user_data/account_data/ 2015-11-18 15:31:04 +00:00
Richard van der Hoff e4d622aaaf Implementation of state rollback in /sync
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
2015-11-13 10:58:56 +00:00
Richard van der Hoff 5ab4b0afe8 Make handlers.sync return a state dictionary, instead of an event list.
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
2015-11-13 10:35:01 +00:00
Richard van der Hoff 5dea4d37d1 Update some comments
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.
2015-11-13 10:31:15 +00:00
Daniel Wagner-Hall f522f50a08 Allow guests to register and call /events?room_id=
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.
2015-11-04 17:29:07 +00:00
Mark Haines 06986e46a3 That TODO was done 2015-11-03 14:28:51 +00:00
Mark Haines 57be722c46 Include room tags in v2 /sync 2015-11-02 16:23:15 +00:00
Mark Haines ddd8566f41 Store room tag content and return the content in the m.tag event 2015-11-02 15:11:31 +00:00
Mark Haines 0e36756383 Merge branch 'develop' into markjh/room_tags 2015-11-02 10:57:00 +00:00
Mark Haines f40b0ed5e1 Inform the client of new room tags using v1 /events 2015-10-29 15:21:09 +00:00
Mark Haines a89b86dc47 Fix pyflakes errors 2015-10-28 16:45:57 +00:00
Mark Haines 892e70ec84 Add APIs for adding and removing tags from rooms 2015-10-28 16:06:57 +00:00
Richard van der Hoff c79c4f9b14 Implement full_state incremental sync
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.
2015-10-26 18:47:18 +00:00
Erik Johnston b0ac0a9438 Merge pull request #319 from matrix-org/erikj/filter_refactor
Refactor api.filtering to have a Filter API
2015-10-22 13:17:10 +01:00
Erik Johnston 45cd2b0233 Refactor api.filtering to have a Filter API 2015-10-20 15:33:25 +01:00
Mark Haines 68b7fc3e2b Add rooms that the user has left under archived in v2 sync. 2015-10-19 17:26:18 +01:00
Mark Haines 54414221e4 Include invites in incremental sync 2015-10-13 11:43:12 +01:00
Mark Haines ab9cf73258 Include invited rooms in the initial sync 2015-10-13 11:03:48 +01:00
Mark Haines 956509dfec Start spliting out the rooms into joined and invited in v2 sync 2015-10-13 10:24:51 +01:00
Mark Haines 586beb8318 Update the filters to match the latest spec.
Apply the filter the 'timeline' and 'ephemeral' keys of rooms.
Apply the filter to the 'presence' key of a sync response.
2015-10-12 16:54:58 +01:00
Mark Haines 0a96a9a023 Set the user as online if they start polling the v2 sync 2015-10-09 19:57:50 +01:00
Mark Haines af7b214476 Merge branch 'markjh/eventstream_presence' into markjh/v2_sync_api 2015-10-09 19:18:09 +01:00
Mark Haines c15cf6ac06 Format the presence events correctly for v2 2015-10-09 18:50:15 +01:00
Mark Haines dfef2b41aa Update the v2 room sync format to match the current v2 spec 2015-10-08 15:17:43 +01:00
Mark Haines e3d3205cd9 Update the sync response to match the latest spec 2015-10-07 15:55:20 +01:00
Mark Haines 471555b3a8 Move the rooms out into a room_map mapping from room_id to room. 2015-10-05 16:39:36 +01:00
Mark Haines f31014b18f Start updating the sync API to match the specification 2015-10-01 17:53:07 +01:00
Kegan Dougal bad780a197 Validate the receipt type before passing it on to the receipt handler 2015-10-01 14:01:52 +01:00
David Baker 184a5c81f0 Merge pull request #274 from matrix-org/add_threepid_fix
Fix adding threepids to an existing account
2015-09-10 10:36:58 +01:00
David Baker 30768dcf40 Fix adding threepids to an existing account 2015-09-10 10:33:48 +01:00
Daniel Wagner-Hall ee3fa1a99c Merge pull request #248 from matrix-org/deviceid
Remove completely unused concepts from codebase
2015-08-25 17:19:06 +01:00
Daniel Wagner-Hall 825f0875bc Fix up one more reference 2015-08-25 16:37:37 +01:00
Daniel Wagner-Hall a0b181bd17 Remove completely unused concepts from codebase
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.
2015-08-25 16:23:06 +01:00
Mark Haines 78323ccdb3 Remove syutil dependency in favour of smaller single-purpose libraries 2015-08-24 16:17:38 +01:00
Daniel Wagner-Hall e8cf77fa49 Merge branch 'develop' into refresh
Conflicts:
	synapse/rest/client/v1/login.py
2015-08-20 16:25:40 +01:00
Daniel Wagner-Hall cecbd636e9 /tokenrefresh POST endpoint
This allows refresh tokens to be exchanged for (access_token,
refresh_token).

It also starts issuing them on login, though no clients currently
interpret them.
2015-08-20 16:21:35 +01:00
David Baker f764f92647 Remove spurious extra arg to set_password 2015-08-20 15:35:54 +01:00
Mark Haines a0b8e5f2fe Merge pull request #211 from matrix-org/email_in_use
Changes for unique emails
2015-08-20 10:04:04 +01:00
Mark Haines 8899df13bf Merge pull request #208 from matrix-org/markjh/end-to-end-key-federation
Federation for end-to-end key requests.
2015-08-18 09:12:54 +01:00
Mark Haines c5966b2a97 Merge remote-tracking branch 'origin/develop' into markjh/end-to-end-key-federation 2015-08-13 17:27:53 +01:00
Daniel Wagner-Hall 415c2f0549 Simplify LoginHander and AuthHandler
* Merge LoginHandler -> AuthHandler
 * Add a bunch of documentation
 * Improve some naming
 * Remove unused branches

I will start merging the actual logic of the two handlers shortly
2015-08-12 15:49:37 +01:00
David Baker f43041aacd Check absent before trying to access keys 2015-08-12 15:44:08 +01:00
David Baker 73605f8070 Just leaving off the $ is fine. r* == registerrrrrrrrr 2015-08-12 15:40:54 +01:00
David Baker a0dea6eaed Remember to yield: not much point testing is a deferred is not None 2015-08-04 16:18:17 +01:00
David Baker 883aabe423 splt long line 2015-08-04 15:20:35 +01:00
David Baker c77048e12f Add endpoint that proxies ID server request token and errors if the given email is in use on this Home Server. 2015-08-04 14:37:09 +01:00
David Baker 7148aaf5d0 Don't try & check the username if we don't have one (which we won't if it's been saved in the auth layer) 2015-08-03 17:03:27 +01:00
Kegan Dougal 11b0a34074 Use the same reg paths as register v1 for ASes.
Namely this means using registration_handler.appservice_register.
2015-07-29 10:00:54 +01:00
Kegan Dougal a4d62ba36a Fix v2_alpha registration. Add unit tests.
V2 Registration forced everyone (including ASes) to create a password for a
user, when ASes should be able to omit passwords. Also unbreak AS registration
in general which checked too early if the given username was claimed by an AS;
it was checked before knowing if the AS was the one doing the registration! Add
unit tests for AS reg, user reg and disabled_registration flag.
2015-07-28 17:34:12 +01:00
Mark Haines 2da3b1e60b Get the end-to-end key federation working 2015-07-24 18:26:46 +01:00
Mark Haines 62c010283d Add federation support for end-to-end key requests 2015-07-23 16:03:38 +01:00
David Baker a56eccbbfc Query for all the ones we were asked about, not just the last... 2015-07-21 16:38:16 -07:00
Mark Haines 3b5823c74d s/take/claim/ for end to end key APIs 2015-07-20 18:23:54 +01:00
Erik Johnston b6d4a4c6d8 Merge pull request #199 from matrix-org/erikj/receipts
Implement read receipts.
2015-07-16 18:18:36 +01:00
David Baker 09489499e7 pep8 + debug line 2015-07-15 19:39:18 +01:00
David Baker 4da05fa0ae Add back in support for remembering parameters submitted to a user-interactive auth call. 2015-07-15 19:28:57 +01:00
Erik Johnston 5989637f37 Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts 2015-07-13 13:50:57 +01:00
Mark Haines a01097d60b Assume that each device for a user has only one of each type of key 2015-07-10 13:26:18 +01:00
Mark Haines bf0d59ed30 Don't bother with a timeout for one time keys on the server. 2015-07-09 14:04:03 +01:00
Erik Johnston ca041d5526 Wire together receipts and the notifer/federation 2015-07-07 15:25:30 +01:00
Erik Johnston e8b2f6f8a1 Add a ReceiptServlet 2015-07-07 10:55:22 +01:00
Mark Haines 2ef182ee93 Add client API for uploading and querying keys for end to end encryption 2015-07-06 18:47:57 +01:00
Erik Johnston a7b65bdedf Add config option to turn off freezing events. Use new encode_json api and ujson.loads 2015-05-29 12:17:33 +01:00
David Baker c37a6e151f Make shared secret registration work again 2015-05-14 12:03:13 +01:00
David Baker eb9bd2d949 user_id now in user_threepids 2015-05-01 15:04:37 +01:00
David Baker 03c4f0ed67 pep8 2015-04-27 12:36:59 +01:00
David Baker f1acb9fd40 logging args 2015-04-27 11:56:34 +01:00
David Baker 7ac8a60c6f More underscores 2015-04-24 11:44:27 +01:00
David Baker a218619626 Use underscores instead of camelcase for id server stuff 2015-04-24 11:27:38 +01:00
David Baker 6532b6e607 Merge branch 'develop' into csauth
Conflicts:
	synapse/http/server.py
2015-04-24 09:37:54 +01:00
David Baker 03eb4adc6e Dedicated error code for failed 3pid auth verification 2015-04-23 18:20:17 +01:00
Mark Haines 1967650bc4 Combine the request wrappers in rest/media/v1 and http/server into a single wrapper decorator 2015-04-21 16:35:53 +01:00
David Baker 8db6832db8 Password reset, finally. 2015-04-17 19:53:47 +01:00
David Baker 117f35ac4a Add endpoint to get threepids from server 2015-04-17 17:20:18 +01:00
David Baker f96ab9d18d make add3pid servlet work 2015-04-17 16:44:49 +01:00
David Baker 0b1a8500a2 just the once would probably be fine 2015-04-17 13:53:54 +01:00
David Baker bf5e54f255 Register the 3pid servlet 2015-04-17 13:44:55 +01:00
David Baker 94e1e58b4d password -> account servlet and add start of an 'add 3pid' endpoint 2015-04-17 13:44:12 +01:00