Commit Graph

67 Commits

Author SHA1 Message Date
Kegan Dougal
ece7a6d995 Unquote sender IDs. 2014-08-19 11:50:57 +01:00
Paul "LeoNerd" Evans
88f7482b92 Perform the 'REST'-level tests of Presence against the real Presence handler as well, mocking out the datastore beneath it 2014-08-19 11:16:23 +01:00
Paul "LeoNerd" Evans
83f031207e Implement and test presence dropping of remote users 2014-08-19 11:16:23 +01:00
Paul "LeoNerd" Evans
6fafa878f6 Deny __iter__ on UserID/RoomID/RoomName instances as it's a subtle bug that will bite you 2014-08-19 11:16:23 +01:00
Kegan Dougal
f48792eec4 Reduce the amount of incredibly spammy stack traces. Expected errors (e.g. SynapseErrors) shouldn't have their full trace logged every time. Don't send responses to disconnected requests. 2014-08-19 10:56:43 +01:00
Kegan Dougal
e37b040bc3 Small amounts of cleanup and bonus round comments. 2014-08-18 17:22:31 +01:00
Kegan Dougal
58548ab557 Implemented GETs for the ContentRepoResource. It all actually appears to be working. 2014-08-18 17:18:54 +01:00
Kegan Dougal
590ab24c85 hs: Make the uploads directory if it doesn't exist. Namespace uploads by the base64 encoded user id of the uploader. Make a reasonable attempt to retry clashing upload paths. Try to guess a sensible file extension depending on the content type. 2014-08-18 17:18:54 +01:00
Kegan Dougal
35da1bf4a3 Auth content uploads. Added a mapping function from request > filename. Added exception handling for content uploads. webclient: Only prefix the client API path on doRequest, not doBaseRequest (this would've broken the identity server auth too). Added matrixService.uploadContent. May not require mFileUpload anymore. 2014-08-18 17:18:54 +01:00
Kegan Dougal
a18b1a649c Added /matrix/content path, HS resource_for_content_repo attribute and FileUploadResource. Added stub methods. 2014-08-18 17:18:54 +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
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
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
Paul "LeoNerd" Evans
ec1fd20e59 Also include users' presence when responding to /rooms/:room_id/members/list 2014-08-15 16:47:50 +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
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
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
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
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
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
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
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
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