Commit Graph

2840 Commits

Author SHA1 Message Date
Erik Johnston
fc26275bb3 Add two different columns for ordering the events table, one which can be used for pagination and one which can be as tokens for notifying clients. Also add a 'processed' field which is currently always set to True 2014-08-18 15:50:41 +01:00
Kegan Dougal
b37ced8f63 Update the default longpoll timeout time. 2014-08-18 14:30:07 +01:00
Paul "LeoNerd" Evans
faf25e3a83 Allow room presence visibility between users who share a room 2014-08-18 13:41:43 +01:00
Paul "LeoNerd" Evans
7d324612ec Precent lack of presence visiblity from causing room /members/list to fail 2014-08-18 13:17:35 +01:00
Erik Johnston
1c2caacd67 Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor 2014-08-18 11:14:57 +01:00
Erik Johnston
291010f100 Not all event streams returns SynapseEvents 2014-08-18 11:06:59 +01:00
Erik Johnston
2f91d16033 We don't need to do a json.loads here 2014-08-18 11:00:22 +01:00
Erik Johnston
1a1e0384ef Ensure we have a 'membership' key in RoomMemberEvents 2014-08-18 10:59:57 +01:00
Erik Johnston
dccb2f57be Disable the ability to GET individualy messages. We need to think about the correct API to do this, as the current one doesn't make much sense. 2014-08-18 10:59:04 +01:00
Matthew Hodgson
98ed3d0222 improve comment 2014-08-16 01:52:03 +01:00
Matthew Hodgson
fc846aa771 emergency bodges to turn off presence ACLs in order to make
matrix.org:8080 actually work
2014-08-16 01:47:17 +01:00
Matthew Hodgson
0f9b633af7 retcols is mandatory. i have no idea how this could ever have worked? 2014-08-16 01:46:35 +01:00
Erik Johnston
7f5c7ddea9 Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor 2014-08-15 17:50:27 +01:00
Paul "LeoNerd" Evans
9c41f635a9 When starting to poll for presence, also include members of all shared rooms 2014-08-15 17:12:07 +01:00
Erik Johnston
40c020ad13 Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor 2014-08-15 16:48:16 +01:00
Paul "LeoNerd" Evans
ec1fd20e59 Also include users' presence when responding to /rooms/:room_id/members/list 2014-08-15 16:47:50 +01:00
Erik Johnston
0e938b1ff7 Rename method name to not clash with other ones in storage. 2014-08-15 16:47:48 +01:00
Erik Johnston
6efc688917 Fix typo of key name 2014-08-15 16:47:26 +01:00
Erik Johnston
506711749f We no longer need to special case room config events. 2014-08-15 16:45:16 +01:00
Erik Johnston
d260a42ca2 PEP8 cleanups 2014-08-15 16:17:36 +01:00
Erik Johnston
8fa3cc37f9 Comment. 2014-08-15 16:11:25 +01:00
Erik Johnston
19946509a4 Support generic events. 2014-08-15 16:06:08 +01:00
Erik Johnston
cd2967d271 Fix bug when generating a key when get_room_events_stream returned zero rows 2014-08-15 16:05:46 +01:00
Erik Johnston
86be66c34e Actually use MAX_STREAM_SIZE constant. 2014-08-15 16:04:54 +01:00
Erik Johnston
8d1f763209 Fix pagination to work with new db schema 2014-08-15 15:53:06 +01:00
Paul "LeoNerd" Evans
3c532314ec Fix imsync's SELECT query to only find the rooms I'm actually joined in, not every room I have ever joined 2014-08-15 15:44:53 +01:00
Erik Johnston
01f089d9fb Correctly return new token when returning events. Serialize events correctly. 2014-08-15 15:28:54 +01:00
Erik Johnston
114984a236 Start chagning the events stream to work with the new DB schema 2014-08-15 13:58:28 +01:00
Erik Johnston
d72f897f07 Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts:
	synapse/storage/stream.py
2014-08-15 11:50:14 +01:00
Erik Johnston
c5f2da5875 Add a check to make sure that during state conflict res we only request a PDU we don't have. 2014-08-15 11:47:01 +01:00
Erik Johnston
1a26905cc9 Fix pontenial bug in state resolution handler that compared dicts rather than their id's 2014-08-15 11:41:20 +01:00
Paul "LeoNerd" Evans
33d62c2c66 Remember to reflect membership LEAVE events to the leaving member so they know it happened 2014-08-15 11:40:58 +01:00
Erik Johnston
5002efa31b Reimplement the get public rooms api to work with new DB schema 2014-08-15 10:26:35 +01:00
Erik Johnston
2c46bb6208 Fix up typos and correct sql queries 2014-08-14 18:40:50 +01:00
Erik Johnston
7e681ad778 Update StreamStore 2014-08-14 18:01:39 +01:00
Erik Johnston
661c711765 Start fixing places that use the data store. 2014-08-14 17:34:37 +01:00
Erik Johnston
78b501eba6 Fix typo 2014-08-14 17:09:28 +01:00
Erik Johnston
2529f2bc01 Rename _execute_query 2014-08-14 16:58:51 +01:00
Kegan Dougal
fef3183461 Pass back the user_id in the response to /login in case it has changed. Store and use that on the webclient rather than the input field. 2014-08-14 16:40:15 +01:00
Kegan Dougal
ca3747fb2f hs: Make /login accept full user IDs or just local parts. webclient: Only enable Register button when both password fields match. 2014-08-14 16:29:51 +01:00
Paul "LeoNerd" Evans
53147e5ae4 Reflect user's messages up to themselves before pushing it to federatoin; also release roomlock before touching federation so we don't halt progress on the world 2014-08-14 16:22:08 +01:00
Paul "LeoNerd" Evans
93a8be7bef We really don't need debug logging of all the SQL statements we execute; we're quite happy these all work now 2014-08-14 16:15:57 +01:00
Paul "LeoNerd" Evans
657ab9ba9d Put some DEBUG logging in lockutils.py so we can debug roomlocks 2014-08-14 16:06:05 +01:00
Kegan Dougal
fb93e14e53 Be more helpful when failing to register/login, stating why (communication error, user in user, wrong credentials, etc). Make the HS send M_USER_IN_USE. 2014-08-14 16:03:04 +01:00
Erik Johnston
937c175029 Fix up RoomMemberStore to work with the new schema. 2014-08-14 16:02:10 +01:00
Erik Johnston
6d6a1c3454 Actually encode dicts as json in the DB 2014-08-14 14:30:25 +01:00
Kegan Dougal
5a5f37ca17 Send forbidden codes when doing login attempts. 2014-08-14 14:29:06 +01:00
Paul "LeoNerd" Evans
0fa05ea331 Round Presence mtime and mtime_age to nearest msec; avoids floats for msec values over the wire 2014-08-14 14:16:01 +01:00
Erik Johnston
cbd5d55222 Change relative db paths to absolute paths in case we daemonize. 2014-08-14 14:08:57 +01:00
Erik Johnston
e4061383b8 Change relative db paths to absolute paths in case we daemonize. 2014-08-14 14:07:22 +01:00
Paul "LeoNerd" Evans
e37de2aef3 chmod +x homeserver.py 2014-08-14 14:05:05 +01:00
Kegan Dougal
61933f8e52 Added M_UNKNOWN_TOKEN error code and send it when there is an unrecognised access_token 2014-08-14 13:47:39 +01:00
Kegan Dougal
2a793a6c42 Default error code BAD_PAGINATION for EventStreamErrors 2014-08-14 11:57:25 +01:00
Kegan Dougal
d253a35539 Added web client prefix 2014-08-14 11:54:37 +01:00
Kegan Dougal
c75add6ec8 Added a urls module for keeping client and federation prefixes. 2014-08-14 11:52:56 +01:00
Kegan Dougal
9fd445eb92 If the web client is enabled, automatically redirect root '/' to the web client path. 2014-08-14 11:37:13 +01:00
Kegan Dougal
e543d6a91d Fixed dynamic resource mapping to clobber dummy Resources with the actual desired Resource in the event of a collision (as is the case for '/matrix/client' and '/matrix/client/api/v1') 2014-08-14 11:18:18 +01:00
Kegan Dougal
de65c34fcf Honour the -w flag to enable the web client at /matrix/client 2014-08-14 10:24:17 +01:00
Kegan Dougal
9a1638ed21 Removed http_server from HomeServer. Updated unit tests to use either resource_for_federation or resource_for_client depending on what is being tested. 2014-08-14 10:18:54 +01:00
Kegan Dougal
29aa13f0d4 Make federation use resource_for_federation as well. 2014-08-14 10:05:06 +01:00
Erik Johnston
10294b6082 Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts:
	synapse/storage/_base.py
2014-08-14 10:01:04 +01:00
Kegan Dougal
9f863d3466 Start phasing out HttpServer: we should be using Resources instead. Added resource_for_client/federation/web_client to the HomeServer and hooked the C-S servlets to operate on resource_for_client. Dynamically construct the Resource tree. 2014-08-14 09:55:16 +01:00
Matthew Hodgson
a4da962bab fix http client GET parameters; somehow missing named param. how could this have ever worked!? 2014-08-14 02:59:54 +01:00
Matthew Hodgson
aebe5ce08a fix whitespace 2014-08-14 02:14:15 +01:00
Paul "LeoNerd" Evans
d05aa651f8 An initial hack at storing presence state-change mtimes in database and presenting age durations to clients/federation events 2014-08-13 19:19:15 +01:00
Paul "LeoNerd" Evans
baf04be5cf Set datastore's .hs field in SQLBaseStore rather than in the toplevel DataStore mixed-in result class 2014-08-13 19:19:15 +01:00
Matthew Hodgson
59dfbaba3b when we're talking about backfilling data in federation, call it backfilling - not pagination. 2014-08-13 18:17:09 +01:00
Erik Johnston
beaf4384d9 Make feedback table also store sender. 2014-08-13 18:03:41 +01:00
Paul "LeoNerd" Evans
3a1cfe18cf Implement directory service federation by Federation Queries; avoid local_only hack; add unit tests 2014-08-13 18:03:41 +01:00
Erik Johnston
336987bb8d Initial stab at refactoring the SQL tables, including rejigging some of the storage layer. 2014-08-13 18:03:41 +01:00
Paul "LeoNerd" Evans
7fb93f2a47 Add a HomeServer.parse_roomalias() to avoid having to RoomAlias.from_sring(..., hs=hs) - similar to parse_userid() 2014-08-13 18:03:41 +01:00
Erik Johnston
3dfa84bec8 Convert im schema to a 'one' table structure 2014-08-13 18:03:41 +01:00
Paul "LeoNerd" Evans
80c056c148 Now that HS->HS Profile lookups use Federation Queries, we don't need the 'local_only' antirecursion hack 2014-08-13 17:23:49 +01:00
Paul "LeoNerd" Evans
505917cb97 Use new Federation Query API to implement HS->HS fetching of remote users' profile information instead of (ab)using the client-side REST API 2014-08-13 17:23:49 +01:00
Paul "LeoNerd" Evans
827de7cee9 Define the concept of a 'federation Query'; creating API for making and handling Queries on the Federation's increasingly-inaccurately-named ReplicationLayer 2014-08-13 17:23:49 +01:00
Paul "LeoNerd" Evans
1ddae5f40b Update get_json()'s documentation to match the actual observed behaviour 2014-08-13 17:23:49 +01:00
Erik Johnston
6df83555cc Handle a potential race in the notifier when calling get_events_for which resulted in an uncaught KeyError 2014-08-13 17:13:26 +01:00
Kegan Dougal
2da1e1526e Don't pass host_web_client flag to register_servlets, it needs to be a Resource not a RestServlet. 2014-08-13 15:57:58 +01:00
Kegan Dougal
38c7e92331 Merge branch 'master' of github.com:matrix-org/synapse 2014-08-13 15:53:44 +01:00
Paul "LeoNerd" Evans
b370f9903c Fix logging verbosity parsing code 2014-08-13 15:14:22 +01:00
Paul "LeoNerd" Evans
820ed34abe Namespace all the Federation HTTP URLs to /matrix/federation/v1/... 2014-08-13 15:07:55 +01:00
Paul "LeoNerd" Evans
55944ccf72 Use strings instead of opaque magic-number constants for presence states; rename AWAY to UNAVAILABLE 2014-08-13 14:31:48 +01:00
Kegan Dougal
5a59da8a94 Merge branch 'master' of github.com:matrix-org/synapse 2014-08-13 13:50:05 +01:00
Kegan Dougal
7f40fa1d46 Added a -w flag which will host the web client if specified. Currently this just delegates to the webclient RestServlet. 2014-08-13 13:50:01 +01:00
Matthew Hodgson
2a0f7541c7 verbose by default please 2014-08-13 12:06:58 +01:00
Kegan Dougal
9b3702c924 Return the room_alias when GETing public rooms. 2014-08-13 11:57:49 +01:00
Matthew Hodgson
f98e6380f1 add in whitespace after copyright statements to improve legibility 2014-08-13 03:14:34 +01:00
Matthew Hodgson
514df1f648 actually register the login servlet (uncommitted code thinko?) 2014-08-13 02:33:04 +01:00
Erik Johnston
4add1c70e9 Just say yes to OPTIONS requests, since we want to turn on CORS headers for all paths 2014-08-12 17:17:14 +01:00
matrix.org
4f475c7697 Reference Matrix Home Server 2014-08-12 15:10:52 +01:00