Daniel Wagner-Hall
da417aa56d
Allow non-guests to peek on rooms using /events
2016-01-20 15:34:07 +00:00
Erik Johnston
ac2842ff1e
Only compute unread notifications for rooms we send down stream
2016-01-19 17:19:53 +00:00
Erik Johnston
3adcc4c86a
Return highlight_count in /sync
2016-01-19 11:35:50 +00:00
Erik Johnston
0d241e1114
Take a deepcopy of push rules before mutating them
2016-01-19 10:15:12 +00:00
Erik Johnston
d1f56f732e
Use static for const dicts
2016-01-18 15:17:56 +00:00
Erik Johnston
0e39dcd135
Remove internal ids
2016-01-18 14:50:17 +00:00
Daniel Wagner-Hall
ac5a4477ad
Require unbanning before other membership changes
2016-01-15 16:27:26 +00:00
Richard van der Hoff
2978053d16
Merge branch 'release-v0.12.1' into develop
2016-01-14 15:04:08 +00:00
David Baker
a7927c13fd
Fix enabling & disabling push rules
2016-01-14 10:53:44 +00:00
Richard van der Hoff
49f33f6438
Add 'event' result to 'context' endpoint
...
... because the context isn't much use without the event.
2016-01-13 16:42:14 +00:00
Mark Haines
9c1f853d58
Rename 'user_name' to 'user_id' in push to make it consistent with the rest of the code
2016-01-13 13:32:59 +00:00
Daniel Wagner-Hall
42aa1f3f33
Merge pull request #478 from matrix-org/daniel/userobject
...
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.
2016-01-11 17:50:22 +00:00
Daniel Wagner-Hall
2110e35fd6
Introduce a Requester object
...
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.
2016-01-11 17:48:45 +00:00
David Baker
c232780081
Merge pull request #456 from matrix-org/store_event_actions
...
Send unread notification counts
2016-01-08 14:47:15 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Daniel Wagner-Hall
11a974da21
Add /_matrix/versions to report supported versions
2016-01-06 18:08:52 +00:00
David Baker
442fcc02f7
Merge remote-tracking branch 'origin/develop' into store_event_actions
2016-01-06 17:28:55 +00:00
Mark Haines
392773ccb2
Guest users must be joined to a room to see it in /sync
2016-01-06 16:44:13 +00:00
David Baker
c79f221192
Add is_guest flag to users db to track whether a user is a guest user or not. Use this so we can run _filter_events_for_client when calculating event_push_actions.
2016-01-06 11:38:09 +00:00
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
928c575c6f
Merge remote-tracking branch 'origin/develop' into store_event_actions
2016-01-04 13:39:51 +00:00
Richard van der Hoff
32d9fd0b26
Expose /login under r0
...
The spec says /login should be available at r0 and 'unstable', so make it so.
2016-01-02 17:24:28 +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
515548a47a
Missing yield
2015-12-10 17:54:23 +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
David Baker
9c9b2829ae
also do more structured logging
2015-12-07 12:01:00 +00:00
David Baker
50e5886de1
pep8
2015-12-07 11:57:48 +00:00
David Baker
ba1d740239
Add logging to pushers API to log the body of the request
2015-12-07 11:52:20 +00:00
Daniel Wagner-Hall
41905784f7
Take object not bool
...
Allows bool as legacy fallback
See https://github.com/matrix-org/matrix-doc/pull/212
2015-12-07 10:44:33 +00:00
Daniel Wagner-Hall
ac213c2e08
Merge pull request #415 from matrix-org/daniel/endpoints
...
Merge pull request #415 from matrix-org/daniel/endpoints
2015-12-03 12:19:12 +00:00
Daniel Wagner-Hall
526bc33e02
Fix implementation of /admin/whois
2015-12-02 17:29:47 +00:00
Daniel Wagner-Hall
872c134807
Update endpoints to reflect current spec
2015-12-02 15:45:04 +00:00
Mark Haines
37b2d69bbc
Reuse a single http client, rather than creating new ones
2015-12-02 11:36:02 +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
Mark Haines
31069ecf6a
Rename presence_handler.send_invite to presence_handler.send_presence_invite to distinguish it from normal invites
2015-12-01 15:59:45 +00:00
Mark Haines
c6a15f5026
Merge pull request #385 from matrix-org/daniel/forgetrooms
...
Allow users to forget rooms
2015-11-20 18:07:26 +00:00
Richard van der Hoff
1d9c1d4166
Merge pull request #389 from matrix-org/rav/flatten_sync_response
...
v2 sync: Get rid of the event_map, and rename the keys of the rooms obj
2015-11-20 15:18:55 +00:00
Erik Johnston
3f151da314
Merge pull request #391 from matrix-org/erikj/remove_token_from_flow
...
Remove m.login.token from advertised flows.
2015-11-20 14:16:59 +00:00
Erik Johnston
e3dae653e8
Comment
2015-11-20 14:05:22 +00:00
Paul "LeoNerd" Evans
dd11bf8a79
Merge branch 'develop' into rav/flatten_sync_response
2015-11-19 17:21:03 +00:00
Paul "LeoNerd" Evans
1cfda3d2d8
Merge branch 'develop' into daniel/forgetrooms
2015-11-19 16:53:13 +00:00
Erik Johnston
37de8a7f4a
Remove m.login.token from advertised flows.
2015-11-19 16:16:49 +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
Daniel Wagner-Hall
ba26eb3d5d
Allow users to forget rooms
2015-11-17 17:17:30 -05:00
Steven Hammerton
f5e25c5f35
Merge branch 'develop' into sh-cas-auth-via-homeserver
2015-11-17 10:55:41 +00:00
Daniel Wagner-Hall
9c3f4f8dfd
Allow guests to /room/:room_id/{join,leave}
2015-11-13 11:56:58 +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
0d08670f61
Merge pull request #360 from matrix-org/daniel/guestroominitialsync
...
Merge pull request #360 from matrix-org/daniel/guestroominitialsync
Allow guest access to room initialSync
2015-11-12 15:19:55 +00:00
Daniel Wagner-Hall
0a93df5f9c
Allow guests to set their display names
...
Depends: https://github.com/matrix-org/synapse/pull/363
Tests in https://github.com/matrix-org/sytest/pull/66
2015-11-12 13:44:39 +00:00
Daniel Wagner-Hall
e93d550b79
Allow guests to access room context API
2015-11-11 17:49:44 +00:00
Daniel Wagner-Hall
f15ba926cc
Allow guest access to room initialSync
2015-11-11 17:13:24 +00:00
Steven Hammerton
ffdc8e5e1c
Snakes not camels
2015-11-11 14:26:47 +00:00
Steven Hammerton
2b779af10f
Minor review fixes
2015-11-11 11:21:43 +00:00
Daniel Wagner-Hall
38d82edf0e
Allow guest users to join and message rooms
2015-11-10 16:57:13 +00:00
Daniel Wagner-Hall
82e8a2d763
Merge pull request #356 from matrix-org/daniel/3pidyetagain
...
Get display name from identity server, not client
2015-11-10 12:44:17 +00:00
Daniel Wagner-Hall
0d63dc3ec9
Get display name from identity server, not client
2015-11-09 17:26:43 +00:00
Richard van der Hoff
9107ed23b7
Add a couple of unit tests for room/<x>/messages
...
... merely because I was trying to figure out how it worked, and couldn't.
2015-11-09 16:16:43 +00:00
Steven Hammerton
fece2f5c77
Merge branch 'develop' into sh-cas-auth-via-homeserver
2015-11-05 20:59:45 +00:00
Erik Johnston
6be1b4b113
Merge pull request #350 from matrix-org/erikj/search
...
Implement pagination, order by and groups in search
2015-11-05 17:52:32 +00:00
Daniel Wagner-Hall
2cebe53545
Exchange 3pid invites for m.room.member invites
2015-11-05 16:43:19 +00:00
Erik Johnston
729ea933ea
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-11-05 15:43:52 +00:00
Erik Johnston
7301e05122
Implement basic pagination for search results
2015-11-05 15:04:08 +00:00
Daniel Wagner-Hall
ca2f90742d
Open up /events to anonymous users for room events only
...
Squash-merge of PR #345 from daniel/anonymousevents
2015-11-05 14:32:26 +00:00
Steven Hammerton
414a4a71b4
Allow hs to do CAS login completely and issue the client with a login token that can be redeemed for the usual successful login response
2015-11-05 14:06:48 +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
Erik Johnston
e83c4b8e3e
Merge pull request #334 from matrix-org/erikj/context_api
...
Add room context api
2015-10-28 18:26:01 +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
Erik Johnston
5cb298c934
Add room context api
2015-10-28 13:45:56 +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
259d10f0e4
Merge branch 'release-v0.10.1' of github.com:matrix-org/synapse into develop
2015-10-23 11:11:56 +01: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
5025ba959f
Add config option to disable password login
2015-10-22 10:37:04 +01:00
Mark Haines
e94ffd89d6
Merge pull request #316 from matrix-org/markjh/v2_sync_archived
...
Add rooms that the user has left under archived in v2 sync.
2015-10-21 15:46:41 +01:00
Kegan Dougal
ede07434e0
Use 403 and message to match handlers/auth
2015-10-21 09:42:07 +01:00
Erik Johnston
45cd2b0233
Refactor api.filtering to have a Filter API
2015-10-20 15:33:25 +01:00
Kegan Dougal
b02a342750
Don't 500 when the email doesn't map to a valid user ID.
2015-10-20 11:07:50 +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
Erik Johnston
e0bf0258ee
Merge pull request #307 from matrix-org/erikj/search
...
Add basic search API
2015-10-19 13:37:15 +01:00
Mark Haines
9371a35e89
Merge pull request #306 from matrix-org/markjh/unused_methods
...
Remove some login classes from synapse.
2015-10-16 18:18:41 +01:00
Erik Johnston
33646eb000
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-10-16 15:35:35 +01:00
Erik Johnston
bcfb653816
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-10-15 16:37:32 +01:00
Daniel Wagner-Hall
f38df51e8d
Merge branch 'develop' into daniel/3pidinvites
2015-10-15 11:51:55 +01:00
Mark Haines
1a934e8bfd
synapse.client.v1.login.LoginFallbackRestServlet and synapse.client.v1.login.PasswordResetRestServlet are unused
2015-10-15 11:09:57 +01:00
Daniel Wagner-Hall
0c38e8637f
Remove unnecessary class-wrapping
2015-10-13 18:00:38 +01:00
Daniel Wagner-Hall
14edea1aff
Move logic into handler
2015-10-13 17:47:58 +01:00
Daniel Wagner-Hall
b68db61222
Add logging
2015-10-13 17:22:50 +01:00
Daniel Wagner-Hall
17dffef5ec
Move event contents into third_party_layout field
2015-10-13 15:48:12 +01:00
Daniel Wagner-Hall
32a453d7ba
Merge branch 'develop' into daniel/3pidinvites
2015-10-13 13:32:43 +01:00
Erik Johnston
f9340ea0d5
Merge branch 'erikj/store_engine' into erikj/search
2015-10-13 13:29:02 +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
f96b480670
Merge branch 'develop' into markjh/v2_sync_api
2015-10-13 10:33:00 +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
Steven Hammerton
739464fbc5
Add a comment to clarify why we split on closing curly brace when reading CAS attribute tags
2015-10-12 16:02:17 +01:00
Erik Johnston
f6fde343a1
Merge remote-tracking branch 'origin/develop' into erikj/search
2015-10-12 15:06:18 +01:00
Steven Hammerton
83b464e4f7
Unpack dictionary in for loop for nicer syntax
2015-10-12 15:05:34 +01:00
Steven Hammerton
7f8fdc9814
Remove not required parenthesis
2015-10-12 14:45:24 +01:00
Steven Hammerton
01a5f1991c
Support multiple required attributes in CAS response, and in a nicer config format too
2015-10-12 14:43:17 +01:00
Steven Hammerton
76421c496d
Allow optional config params for a required attribute and it's value, if specified any CAS user must have the given attribute and the value must equal
2015-10-12 11:11:49 +01:00
Steven Hammerton
7845f62c22
Parse both user and attributes from CAS response
2015-10-12 10:55:13 +01:00
Erik Johnston
61561b9df7
Keep FTS indexes up to date. Only search through rooms currently joined
2015-10-12 10:49:53 +01:00
Steven Hammerton
95f7661170
Raise LoginError if CasResponse doensn't contain user
2015-10-10 10:54:19 +01:00
Steven Hammerton
a9c299c0be
Fix my broken line splitting
2015-10-10 10:54:19 +01:00
Steven Hammerton
e52f4dc599
Use UserId to create FQ user id
2015-10-10 10:54:19 +01:00
Steven Hammerton
625e13bfde
Add get_raw method to SimpleHttpClient, use this in CAS auth rather than requests
2015-10-10 10:54:19 +01:00
Steven Hammerton
22112f8d14
Formatting changes
2015-10-10 10:49:42 +01:00
Steven Hammerton
c33f5c1a24
Provide ability to login using CAS
2015-10-10 10:49:42 +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
Erik Johnston
c85c912562
Add basic full text search impl.
2015-10-09 15:48:31 +01:00
Mark Haines
51ef725647
Use 'true' rather than '1' for archived flag
2015-10-08 18:13:02 +01:00
Mark Haines
dc72021748
Add a flag to initial sync to indicate we want rooms that the user has left
2015-10-08 17:26:23 +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
Daniel Wagner-Hall
fcd9ba8802
Fix lint errors
2015-10-06 10:13:05 -05: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
Daniel Wagner-Hall
58e6a58eb7
Merge branch 'develop' into daniel/3pidinvites
2015-10-05 10:33:41 -05:00
Mark Haines
f31014b18f
Start updating the sync API to match the specification
2015-10-01 17:53:07 +01:00
Daniel Wagner-Hall
5b3e9713dd
Implement third party identifier invites
2015-10-01 17:49:52 +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
Mark Haines
ee2d722f0f
Merge pull request #276 from matrix-org/markjh/history_for_rooms_that_have_been_left
...
SPEC-216: Allow users to view the history of rooms that they have left.
2015-09-21 14:38:13 +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
Mark Haines
3c166a24c5
Remove undocumented and unimplemented 'feedback' parameter from the Client-Server API
2015-09-09 16:05:09 +01:00
Mark Haines
bc8b25eb56
Allow users that have left the room to view the member list from the point they left
2015-09-09 15:42:16 +01:00
Daniel Wagner-Hall
d3c0e48859
Merge erikj/user_dedup to develop
2015-08-26 13:42:45 +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
Erik Johnston
42f12ad92f
When logging in fetch user by user_id case insensitively, *unless* there are multiple case insensitive matches, in which case require the exact user_id
2015-08-21 11:38:44 +01:00
David Baker
21b71b6d7c
Return fully qualified user_id as per spec
2015-08-20 21:54:53 +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
David Baker
4cf302de5b
Comma comma comma comma comma chameleon
2015-08-20 10:31:18 +01:00
David Baker
c50ad14bae
Merge branch 'develop' into email_login
2015-08-20 10:16:01 +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
185ac7ee6c
Allow sign in using email address
2015-08-04 16:29: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
Kegan Dougal
ddef5ea126
Remove semicolon.
2015-07-20 14:02:36 +01:00
Kegan Dougal
b6ee0585bd
Parse the ID given to /invite|ban|kick to make sure it looks like a user ID.
2015-07-20 13:55:19 +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
Erik Johnston
b7cb37b189
Merge pull request #198 from matrix-org/markjh/client-end-to-end-key-management
...
Client end to end key management API
2015-07-10 13:36:17 +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
Erik Johnston
f3049d0b81
Small tweaks to SAML2 configuration.
...
- Add saml2 config docs to default config.
- Use existence of saml2 config to indicate if saml2 should be enabled.
2015-07-10 10:50:14 +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
Muthu Subramanian
8cd34dfe95
Make SAML2 optional and add some references/comments
2015-07-09 13:34:47 +05:30
Muthu Subramanian
d2caa5351a
code beautify
2015-07-09 12:58:15 +05:30
Muthu Subramanian
77c5db5977
code beautify
2015-07-08 16:05:20 +05:30
Muthu Subramanian
81682d0f82
Integrate SAML2 basic authentication - uses pysaml2
2015-07-08 15:36:54 +05:30
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
fb7def3344
Remove access_token from synapse.rest.client.v1.transactions {get,store}_response logging
2015-06-16 10:09:43 +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
Erik Johnston
9ba3c1ede4
Merge pull request #165 from matrix-org/bugs/SYN-390
...
SYN-390: Don't modify the dictionary returned from the data store
2015-05-26 10:20:36 +01:00
Mark Haines
a0bebeda8b
SYN-390: Don't modify the dictionary returned from the data store
2015-05-26 10:14:15 +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
David Baker
ea1776f556
Return user ID in use error straight away
2015-04-16 19:56:44 +01:00
David Baker
766bd8e880
Dummy login so we can do the first POST request to get login flows without it just succeeding
2015-04-15 17:14:25 +01:00
David Baker
a19b739909
Regstration with email in v2
2015-04-15 15:50:38 +01:00
David Baker
4eb6d66b45
Add app service auth back in to v2 register
2015-04-02 17:51:19 +01:00
David Baker
6b59650753
Throw sensible errors on not-json when allowing empty body
2015-04-02 17:45:16 +01:00
David Baker
41cd778d66
pep8
2015-04-02 17:06:17 +01:00
David Baker
70a84f17f3
Add shared secret auth into register v2 and switch the script over.
2015-04-02 17:01:29 +01:00
David Baker
e9c908ebc0
Completely replace fallback auth for C/S V2:
...
* Now only the auth part goes to fallback, not the whole operation
* Auth fallback is a normal API endpoint, not a static page
* Params like the recaptcha pubkey can just live in the config
Involves a little engineering on JsonResource so its servlets aren't always forced to return JSON. I should document this more, in fact I'll do that now.
2015-04-01 15:05:30 +01:00
David Baker
9f642a93ec
pep8
2015-03-31 09:50:44 +01:00
David Baker
59bf16eddc
New registration for C/S API v2. Only ReCAPTCHA working currently.
2015-03-30 18:13:10 +01:00
David Baker
c1a256cc4c
Allow multiple pushers for a single app ID & pushkey, honouring the 'append' flag in the API.
2015-03-25 19:06:22 +00:00
David Baker
c7023f2155
1) Pushers are now associated with an access token
...
2) Change places where we mean unauthenticated to 401, not 403, in C/S v2: hack so it stays as 403 in v1 because web client relies on it.
2015-03-24 17:24:15 +00:00
David Baker
d19e79ecc9
Make deleting other access tokens when you change your password actually work
2015-03-24 15:33:48 +00:00
David Baker
78adccfaf4
pep8 / pyflakes
2015-03-23 14:23:51 +00:00
David Baker
d98660a60d
Implement password changing (finally) along with a start on making client/server auth more general.
2015-03-23 14:20:28 +00:00
Erik Johnston
f88db7ac0b
Factor out user id validation checks
2015-03-18 11:34:18 +00:00
Erik Johnston
57976f646f
Do more validation of incoming request
2015-03-18 11:30:04 +00:00
Erik Johnston
250e143084
Use 403 instead of 400
2015-03-16 13:11:42 +00:00
Erik Johnston
69135f59aa
Implement registering with shared secret.
2015-03-13 15:23:37 +00:00
David Baker
04f8478aaa
Add the master push rule for the break-my-push button. Allow server default rules to be disabled by default.
2015-03-10 17:26:25 +00:00
David Baker
6fab7bd2c1
s/user_name/user/ as per mjark's comment
2015-03-02 18:17:19 +00:00
David Baker
09f9e8493c
Oops, missed a replacement.
2015-03-02 17:37:22 +00:00
David Baker
20436cdf75
Blank lines
2015-03-02 15:58:12 +00:00
David Baker
2a6dedd7cc
It's set_tweak now, not set_sound
2015-02-27 18:38:56 +00:00
David Baker
1959088156
Add API for getting/setting enabled-ness of push rules.
2015-02-26 18:07:44 +00:00
David Baker
a025055643
SYWEB-278 Don't allow rules with no rule_id.
2015-02-25 14:02:38 +00:00
Erik Johnston
15e2d7e387
Always allow AS to register
2015-02-20 11:39:53 +00:00
Erik Johnston
0722f982d3
Disable registration if config option was set.
2015-02-19 14:22:20 +00:00
Mark Haines
0d872f5aa6
Merge pull request #50 from matrix-org/application-services
...
Application Services
2015-02-13 15:06:14 +00:00
Erik Johnston
4ebbaf0d43
Blunty replace json with simplejson
2015-02-11 14:23:10 +00:00
Kegan Dougal
9978c5c103
Merge branch 'develop' into application-services
2015-02-11 10:03:24 +00:00
Mark Haines
84a769cdb7
Fix code-style
2015-02-10 17:58:36 +00:00
Mark Haines
b085fac735
Code-style fixes
2015-02-10 16:30:48 +00:00
Kegan Dougal
53557fc532
Merge branch 'develop' into application-services
2015-02-09 15:20:56 +00:00
Erik Johnston
24cc6979fb
Log when we receive a request, when we send a response and how long it took to process it.
2015-02-09 13:46:22 +00:00
Kegan Dougal
c3ae8def75
Grant ASes the ability to delete aliases in their own namespace.
2015-02-06 11:32:07 +00:00
Kegan Dougal
e426df8e10
Grant ASes the ability to create alias in their own namespace.
...
Add a new errcode type M_EXCLUSIVE when users try to create aliases inside
AS namespaces, and when ASes try to create aliases outside their own
namespace.
2015-02-06 10:57:14 +00:00
Kegan Dougal
0227618d3c
Add m.login.application_service registration procedure.
...
This allows known application services to register any user ID under their
own user namespace(s).
2015-02-05 17:29:27 +00:00
David Baker
a93fa42bce
priority class now dealt with in namespaced rule_id
2015-02-05 15:45:16 +00:00
David Baker
aaf50bf6f3
Give server default rules the 'default' attribute and fix various brokenness.
2015-02-05 15:11:38 +00:00
David Baker
2df41aa138
Server default rules now of all kinds rather than all being at lowest prio.
2015-02-05 14:46:37 +00:00
David Baker
f90782a658
namespace rule IDs to be unique within their scope and rule type.
2015-02-05 14:46:37 +00:00
David Baker
2e77ba637a
More s/instance_handle/profile_tag/
2015-02-04 16:24:15 +00:00
David Baker
dc7bb70f22
s/instance_handle/profile_tag/
2015-02-03 16:51:07 +00:00
David Baker
b4b892f4a3
Spit out server default rules too.
2015-01-30 15:54:51 +00:00
Mark Haines
6dc92d3427
Merge pull request #41 from matrix-org/client_v2_sync
...
Client v2 sync
2015-01-30 15:54:25 +00:00
David Baker
4ffac34a64
Add glob asterisks when running rules.
...
Means that now you can't do exact matches even in override rules,
but I think we can live with that. Advantage is that you'll now
always get back what was put in to the API.
2015-01-30 15:03:56 +00:00
Erik Johnston
471c47441d
Merge pull request #37 from matrix-org/client_v2_filter
...
Client v2 filter
2015-01-30 14:56:08 +00:00
Mark Haines
4a67834bc8
Pass client info to the sync_config
2015-01-30 11:50:15 +00:00
Mark Haines
22dd1cde2d
Filter the recent events before applying the limit when doing an incremental sync with a gap
2015-01-30 11:32:35 +00:00
Mark Haines
365a186729
Add basic filtering support
2015-01-29 18:11:28 +00:00
Mark Haines
7ceda8bf3d
Merge branch 'client_v2_filter' into client_v2_sync
2015-01-29 18:04:07 +00:00
Mark Haines
93ed31dda2
Create a separate filter object to do the actual filtering, so that we can
...
split the storage and management of filters from the actual filter code
and don't have to load a filter from the db each time we filter an event
2015-01-29 17:45:07 +00:00
David Baker
4bdfce30d7
Renumber priority classes so we can use 0 for defaults.
2015-01-29 17:12:11 +00:00
David Baker
e0d2c6889b
Allow kind to be set to null to delete a pusher.
2015-01-29 17:05:00 +00:00
Mark Haines
722b65f461
Move typing notifs to an "emphermal" event list on the room object
2015-01-29 16:41:21 +00:00
Mark Haines
8e571cbed8
Merge branch 'client_v2_filter' into client_v2_sync
2015-01-29 16:18:59 +00:00
Mark Haines
295322048d
Merge branch 'develop' into client_v2_filter
2015-01-29 16:18:34 +00:00
Mark Haines
acb68a39e0
Code style fixes.
2015-01-29 16:12:40 +00:00
Mark Haines
cf7c54ec93
Merge branch 'client_v2_filter' into client_v2_sync
2015-01-29 15:55:58 +00:00
Mark Haines
33391db5f8
Merge in auth changes from develop
2015-01-29 15:54:54 +00:00
Mark Haines
396a67a09a
Merge branch 'client_v2_filter' into client_v2_sync
...
Conflicts:
synapse/rest/client/v2_alpha/__init__.py
2015-01-29 14:58:00 +00:00
Mark Haines
9d8f798a3f
Merge changes from develop
2015-01-29 14:55:27 +00:00
Mark Haines
3dbce6f4a5
Add typing notifications to sync
2015-01-29 03:33:51 +00:00
Mark Haines
b9c442c85c
Include transaction ids in unsigned section of events in the sync results for the clients that made those requests
2015-01-29 02:46:00 +00:00
David Baker
8552ed8df2
Change uses of get_user_by_req because it returns a tuple now.
2015-01-28 18:04:40 +00:00
Mark Haines
c81a19552f
Add ports back to demo/start.sh
2015-01-28 17:32:49 +00:00
Mark Haines
9c61556504
Merge branch 'develop' into client_v2_sync
2015-01-28 17:29:30 +00:00
Mark Haines
26c8fff19e
Merge pull request #36 from matrix-org/device_id_from_access_token
...
Extract the device id and token id from the access token when autheniticating users
2015-01-28 17:19:28 +00:00
Mark Haines
388581e087
Extract the id token of the token when authing users, include the token and device_id in the internal meta data for the event along with the transaction id when sending events
2015-01-28 16:58:23 +00:00
Kegan Dougal
c23e3db544
Add filter JSON sanity checks.
2015-01-28 16:45:18 +00:00
Mark Haines
c59bcabf0b
Return the device_id from get_auth_by_req
2015-01-28 15:43:41 +00:00
David Baker
2cfdfee572
spaces
2015-01-28 14:41:51 +00:00
David Baker
289a249874
Unnecessary newlines.
2015-01-28 14:39:03 +00:00
David Baker
3cb5b73c0d
Unnecessary newline.
2015-01-28 14:37:55 +00:00
David Baker
8807f4170e
Better style
2015-01-28 14:35:00 +00:00
David Baker
032f8d4ed3
Another superfluous newline
2015-01-28 14:33:15 +00:00
David Baker
d93ce29a86
Ah, the comma of doom.
2015-01-28 14:27:01 +00:00
David Baker
6741c3dbd9
Brackets are nicer
2015-01-28 14:26:03 +00:00
David Baker
4fbf2328c2
Unnecessary new line
2015-01-28 14:24:28 +00:00
David Baker
20c47383dc
Oops, bad merge: needed to change the base class of the rest servlets too.
2015-01-28 14:10:46 +00:00
David Baker
c291a4d522
Merge branch 'develop' into pushers
...
Conflicts:
synapse/handlers/events.py
synapse/server.py
2015-01-28 12:51:05 +00:00
Mark Haines
e020574d65
Fix Formatting
2015-01-27 20:19:36 +00:00
Paul "LeoNerd" Evans
059651efa1
Have the Filtering API return Deferreds, so we can do the Datastore implementation nicely
2015-01-27 16:17:56 +00:00
Paul "LeoNerd" Evans
05c7cba73a
Initial trivial implementation of an actual 'Filtering' object; move storage of user filters into there
2015-01-27 14:28:56 +00:00
Paul "LeoNerd" Evans
0484d7f6e9
Merge branch 'develop' into client_v2_filter
2015-01-27 13:11:03 +00:00
Mark Haines
436513068d
Start implementing the non-incremental sync portion of the v2 /sync API
2015-01-26 18:53:31 +00:00
Mark Haines
3186c5bdbc
Merge branch 'develop' into client_v2_sync
2015-01-26 16:32:40 +00:00
Mark Haines
7f6f3f9d62
Pass the current time to serialize event, rather than passing an
...
HS and getting a clock from it and calling time_msec on the clock.
Remove the serialize_event method from the HS since it is no longer
needed.
2015-01-26 16:11:28 +00:00
Paul "LeoNerd" Evans
8d7accb28f
Initial minimal attempt at /user/:user_id/filter API - in-memory storage, no actual filter implementation
2015-01-26 14:33:30 +00:00
Mark Haines
7b814d3f7f
Add client v2_alpha resource to synapse server resource tree
2015-01-23 18:55:19 +00:00
Mark Haines
e26340cee7
Start implementing the v2_alpha sync API
2015-01-23 18:48:17 +00:00
David Baker
5f84ba8ea1
Add API to delete push rules.
2015-01-23 17:49:37 +00:00
David Baker
f21f9fa3c5
Use push settings!
2015-01-23 17:07:06 +00:00
Mark Haines
4be637cb12
Extract the client v1 base RestServlet to a separate class
2015-01-23 14:09:51 +00:00
David Baker
b3f66ea6fb
more pep8
2015-01-23 13:28:00 +00:00
David Baker
d3e72b4d87
Make string format tuple an actual tuple
2015-01-23 13:25:58 +00:00
David Baker
98e1080555
redundant parens
2015-01-23 13:25:36 +00:00
David Baker
54c689c819
stray space
2015-01-23 13:25:14 +00:00
David Baker
6188c4f69c
make per-device rules work
2015-01-23 13:23:10 +00:00
Mark Haines
ada711504e
Replace hs.parse_roomalias with RoomAlias.from_string
2015-01-23 13:21:58 +00:00
Mark Haines
1c06c48ce2
Replace hs.parse_roomid with RoomID.from_string
2015-01-23 11:55:12 +00:00
Mark Haines
5759bec43c
Replace hs.parse_userid with UserID.from_string
2015-01-23 11:47:15 +00:00
David Baker
49fe31792b
Add slightly pedantic trailing slash error.
2015-01-23 11:19:02 +00:00
Mark Haines
7256def8e4
Merge rest servlets into the client json resource object
2015-01-23 10:37:38 +00:00
David Baker
bcd48b9636
Fix adding rules without before/after & add the rule that we couldn't find to the error
2015-01-23 10:28:25 +00:00
David Baker
6927b6b197
This really serves me right for ever making a map called 'map'.
2015-01-23 10:21:47 +00:00
David Baker
8a850573c9
As yet fairly untested GET API for push rules
2015-01-22 19:32:17 +00:00
David Baker
5c6189ea3e
Merge branch 'develop' into pushers
...
Conflicts:
synapse/rest/__init__.py
2015-01-22 17:46:16 +00:00
Mark Haines
97c68c508d
Move rest APIs back under the rest directory
2015-01-22 16:10:07 +00:00