Steven Hammerton
f20d064e05
Always check guest = true in macaroons
2015-11-17 10:58:05 +00:00
Steven Hammerton
f5e25c5f35
Merge branch 'develop' into sh-cas-auth-via-homeserver
2015-11-17 10:55:41 +00:00
Paul "LeoNerd" Evans
aca6e5bf46
Don't complain if /make_join response lacks 'prev_state' list (SYN-517)
2015-11-13 17:27:25 +00:00
Daniel Wagner-Hall
641420c5e0
Clean up room initialSync for guest users
2015-11-13 15:44:57 +00:00
Daniel Wagner-Hall
9c3f4f8dfd
Allow guests to /room/:room_id/{join,leave}
2015-11-13 11:56:58 +00:00
Erik Johnston
0644f0eb7d
Bump version and change log
2015-11-13 11:43:29 +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
fddedd51d9
Fix a few race conditions in the state calculation
...
Be a bit more careful about how we calculate the state to be returned by
/sync. In a few places, it was possible for /sync to return slightly later
state than that represented by the next_batch token and the timeline. In
particular, the following cases were susceptible:
* On a full state sync, for an active room
* During a per-room incremental sync with a timeline gap
* When the user has just joined a room. (Refactor check_joined_room to make it
less magical)
Also, use store.get_state_for_events() (and thus the existing stategroups) to
calculate the state corresponding to a particular sync position, rather than
state_handler.compute_event_context(), which recalculates from first principles
(and tends to miss some state).
Merged from PR https://github.com/matrix-org/synapse/pull/372
2015-11-13 10:39:09 +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
fc27ca9006
Merge pull request #369 from matrix-org/daniel/guestnonevents
...
Return non-room events from guest /events calls
2015-11-12 17:28:48 +00:00
Daniel Wagner-Hall
468a2ed4ec
Return non-room events from guest /events calls
2015-11-12 16:45:28 +00:00
Erik Johnston
018b504f5b
Merge pull request #368 from matrix-org/erikj/fix_federation_profile
...
Fix missing profile data in federation joins
2015-11-12 16:30:02 +00:00
Erik Johnston
49f1758d74
Merge pull request #366 from matrix-org/erikj/search_fix_sqlite_faster
...
Use a (hopefully) more efficient SQL query for doing recency based room search
2015-11-12 16:24:32 +00:00
Erik Johnston
c0b3554401
Fix missing profile data in federation joins
...
There was a regression where we stopped including profile data in
initial joins for rooms joined over federation.
2015-11-12 16:19:55 +00:00
Erik Johnston
3de46c7755
Trailing whitespace
2015-11-12 15:36:43 +00:00
Erik Johnston
8fd8e72cec
Expand comment
2015-11-12 15:33:47 +00:00
Richard van der Hoff
78f6010207
Fix an issue with ignoring power_level changes on divergent graphs
...
Changes to m.room.power_levels events are supposed to be handled at a high
priority; however a typo meant that the relevant bit of code was never
executed, so they were handled just like any other state change - which meant
that a bad person could cause room state changes by forking the graph from a
point in history when they were allowed to do so.
2015-11-12 15:24:59 +00:00
Daniel Wagner-Hall
06bfd0a3c0
Merge pull request #367 from matrix-org/daniel/readafterleave
...
Merge pull request #367 from matrix-org/daniel/readafterleave
Tweak guest access permissions
2015-11-12 15:22:02 +00:00
Erik Johnston
764e79d051
Comment
2015-11-12 15:19:56 +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
Erik Johnston
320408ef47
Fix SQL syntax
2015-11-12 15:09:45 +00:00
Daniel Wagner-Hall
fb7e260a20
Tweak guest access permissions
...
* Allow world_readable rooms to be read by guests who have joined and
left
* Allow regular users to access world_readable rooms
2015-11-12 15:02:00 +00:00
Erik Johnston
14a9d805b9
Use a (hopefully) more efficient SQL query for doing recency based room search
2015-11-12 14:48:39 +00:00
Erik Johnston
39de87869c
Fix bug where assumed dict was namedtuple
2015-11-12 14:47:48 +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
50f1afbd5b
Consider joined guest users as joined users
...
Otherwise they're inconveniently allowed to write events to the room
but not to read them from the room.
2015-11-12 13:37:07 +00:00
Daniel Wagner-Hall
6a9c4cfd0b
Fix race creating directories
2015-11-12 11:58:48 +00:00
Erik Johnston
aa3ab6c6a0
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.11.0
2015-11-11 18:17:49 +00:00
Erik Johnston
04034d0b56
Merge pull request #361 from matrix-org/daniel/guestcontext
...
Allow guests to access room context API
2015-11-11 18:17:35 +00:00
Erik Johnston
6341be45c6
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.11.0
2015-11-11 17:51:14 +00:00
Daniel Wagner-Hall
e93d550b79
Allow guests to access room context API
2015-11-11 17:49:44 +00:00
Erik Johnston
e21cef9bb5
Merge pull request #359 from matrix-org/markjh/incremental_indexing
...
Incremental background updates for db indexes
2015-11-11 17:19:51 +00:00
Mark Haines
e1627388d1
Fix param style to work on both sqlite and postgres
2015-11-11 17:14:56 +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
Mark Haines
940a161192
Fix the background update
2015-11-11 13:59:40 +00:00
Steven Hammerton
2b779af10f
Minor review fixes
2015-11-11 11:21:43 +00:00
Steven Hammerton
dd2eb49385
Share more code between macaroon validation
2015-11-11 11:12:35 +00:00
Daniel Wagner-Hall
cf437900e0
Return world_readable and guest_can_join in /publicRooms
2015-11-10 17:10:27 +00:00
Daniel Wagner-Hall
38d82edf0e
Allow guest users to join and message rooms
2015-11-10 16:57:13 +00:00
Mark Haines
90b503216c
Use a background task to update databases to use the full text search
2015-11-10 16:20:13 +00:00
Mark Haines
a412b9a465
Run the background updates when starting synapse.
2015-11-10 15:50:58 +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
Mark Haines
2ede7aa8a1
Add background update task for reindexing event search
2015-11-09 19:29:32 +00:00
Richard van der Hoff
c7db2068c8
Don't fiddle with results returned by event sources
...
Overwriting hashes returned by other methods is poor form.
Fixes: SYN-516
2015-11-09 18:09:46 +00:00
Daniel Wagner-Hall
0d63dc3ec9
Get display name from identity server, not client
2015-11-09 17:26:43 +00:00
Mark Haines
c6a01f2ed0
Add storage module for tracking background updates.
...
The progress for each background update is stored as a JSON blob in the
database. Each background update is broken up into separate batches.
The batch size is automatically tuned to try avoid blocking single
threaded databases for too long.
2015-11-09 17:26:27 +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
Mark Haines
bbe10e8be7
Merge branch 'develop' into markjh/SYN-513
...
Conflicts:
synapse/storage/tags.py
2015-11-09 15:01:59 +00:00
Mark Haines
c4135d85e1
SYN-513: Include updates for rooms that have had all their tags deleted
2015-11-09 14:53:08 +00:00
Matthew Hodgson
dd40fb68e4
fix comedy important missing comma breaking recent-ordered FTS on sqlite
2015-11-08 16:04:37 +00:00
Matthew Hodgson
767c20a869
add a key existence check to tags_by_room to avoid /events 500'ing when testing against vector
2015-11-06 20:49:57 +01:00
Daniel Wagner-Hall
f2c4ee41b9
Remove accidentally added ID column
2015-11-06 14:27:49 +00:00
Steven Hammerton
0b31223c7a
Updates to fallback CAS login to do new token login
2015-11-06 09:57:17 +00:00
Steven Hammerton
fece2f5c77
Merge branch 'develop' into sh-cas-auth-via-homeserver
2015-11-05 20:59:45 +00:00
Erik Johnston
f23af34729
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.11.0
2015-11-05 18:00:51 +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
Erik Johnston
66d36b8e41
Be explicit about what we're doing
2015-11-05 17:26:19 +00:00
Erik Johnston
2aa98ff3bc
Remove redundant test
2015-11-05 17:25:50 +00:00
Erik Johnston
5ee070d21f
Increment by one, not five
2015-11-05 17:25:33 +00:00
Erik Johnston
f1dcaf3296
Bump changelog and version number
2015-11-05 17:20:28 +00:00
Daniel Wagner-Hall
2cebe53545
Exchange 3pid invites for m.room.member invites
2015-11-05 16:43:19 +00:00
Erik Johnston
1ad6222ebf
COMMENTS
2015-11-05 16:29:16 +00:00
Erik Johnston
5bc690408d
Merge pull request #340 from matrix-org/erikj/server_retries
...
Retry dead servers a lot less often
2015-11-05 16:15:50 +00:00
Erik Johnston
3640ddfbf6
Error handling
2015-11-05 16:10:54 +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
347146be29
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2015-11-05 15:35:17 +00:00
Erik Johnston
7a5ea067e2
Merge branch 'release-v0.10.1' of github.com:matrix-org/synapse into develop
2015-11-05 15:35:05 +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
Mark Haines
7a369e8a55
Merge pull request #347 from matrix-org/markjh/check_filter
...
Remove fields that are both unspecified and unused from the filter checks
2015-11-05 11:15:39 +00:00
Steven Hammerton
45f1827fb7
Add service URL to CAS config
2015-11-04 23:32:30 +00:00
Erik Johnston
05c326d445
Implement order and group by
2015-11-04 17:57:44 +00:00
Daniel Wagner-Hall
4e62ffdb21
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2015-11-04 17:31:01 +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
33b3e04049
Merge branch 'develop' into daniel/removesomelies
...
Conflicts:
synapse/notifier.py
2015-11-04 16:01:00 +00:00
Mark Haines
285d056629
Remove fields that are both unspecified and unused from the filter checks, check the right top level definitions in the filter
2015-11-04 15:47:19 +00:00
Mark Haines
c452dabc3d
Remove the LockManager class because it wasn't being used
2015-11-04 14:08:15 +00:00
Mark Haines
f74f48e9e6
Merge pull request #341 from matrix-org/markjh/v2_sync_receipts
...
Include read receipts in v2 sync
2015-11-03 18:45:13 +00:00
Erik Johnston
6a3a840b19
Merge pull request #343 from matrix-org/erikj/fix_retries
...
Fix broken cache for getting retry times.
2015-11-03 17:51:49 +00:00
Mark Haines
a3bfef35fd
Merge branch 'develop' into markjh/v2_sync_receipts
...
Conflicts:
synapse/handlers/sync.py
2015-11-03 17:31:17 +00:00
Mark Haines
6797fcd9ab
Merge pull request #335 from matrix-org/markjh/room_tags
...
Add APIs for adding and removing tags from rooms
2015-11-03 16:45:53 +00:00
Erik Johnston
97d792b28f
Don't rearrange transaction_queue
2015-11-03 16:31:08 +00:00
Erik Johnston
7ce264ce5f
Fix broken cache for getting retry times. This meant we retried remote destinations way more frequently than we should
2015-11-03 16:24:03 +00:00
Mark Haines
06986e46a3
That TODO was done
2015-11-03 14:28:51 +00:00
Mark Haines
5897e773fd
Spell "deferred" more correctly
2015-11-03 14:27:35 +00:00
Mark Haines
2657140c58
Include read receipts in v2 sync
2015-11-02 17:54:04 +00:00
Erik Johnston
eacb068ac2
Retry dead servers a lot less often
2015-11-02 16:56:30 +00:00
Mark Haines
57be722c46
Include room tags in v2 /sync
2015-11-02 16:23:15 +00:00
Daniel Wagner-Hall
771ca56c88
Remove more unused parameters
2015-11-02 15:31:57 +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
Daniel Wagner-Hall
192241cf2a
Remove unused arguments and code
2015-11-02 15:10:59 +00:00
Mark Haines
0e36756383
Merge branch 'develop' into markjh/room_tags
2015-11-02 10:57:00 +00:00
Mark Haines
fb46937413
Support clients supplying older tokens, fix short poll test
2015-10-30 16:38:35 +00:00
Mark Haines
79b65f3875
Include tags in v1 room initial sync
2015-10-30 16:28:19 +00:00
Daniel Wagner-Hall
621e84d9a0
Add missing column
2015-10-30 16:25:53 +00:00
Mark Haines
fdf73c6855
Include room tags v1 /initialSync
2015-10-30 16:22:32 +00:00
Mark Haines
d58edd98e9
Update the other place check_joined_room is called
2015-10-30 11:15:37 +00:00
Mark Haines
5cf22f0596
Don't mark newly joined room timelines as limited in an incremental sync
2015-10-29 19:58:51 +00:00
Erik Johnston
f6e6f3d87a
Make search API honour limit set in filter
2015-10-29 16:17:47 +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
5d80dad99e
Merge pull request #336 from matrix-org/erikj/search
...
Optionally return event contexts with search results
2015-10-28 18:39:40 +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
Erik Johnston
a2e5f7f3d8
Optionally return event contexts with search results
2015-10-28 18:25:11 +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
56dbcd1524
Docs
2015-10-28 14:05:50 +00:00
Richard van der Hoff
234d6f9f3e
Merge pull request #332 from matrix-org/rav/full_state_sync
...
Implement full_state incremental sync
2015-10-28 14:04:39 +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
Richard van der Hoff
f69a5c9134
Fix a 500 error resulting from empty room_ids
...
POST /_matrix/client/api/v1/rooms//send/a.b.c gave a 500 error, because we
assumed that rooms always had at least one character.
2015-10-26 18:44:03 +00:00
Erik Johnston
f73de2004e
Use correct service url
2015-10-26 18:12:09 +00:00
Erik Johnston
87961d8dcf
Add login fallback
2015-10-26 17:35:24 +00:00
Erik Johnston
fa1cf5ef34
Move static folder into synapse
...
This is because otherwise it won't get picked up by python packaging.
This also fixes the problem where the "static" folder was found if
synapse wasn't started from that directory.
2015-10-26 15:37:44 +00:00
Erik Johnston
3f0a57eb9b
Merge pull request #328 from matrix-org/erikj/search
...
Pull out sender when computing search results
2015-10-26 10:24:19 +00:00
Erik Johnston
4cf633d5e9
Pull out sender when computing search results
2015-10-23 15:41:36 +01:00
Erik Johnston
b8e37ed944
Merge pull request #327 from matrix-org/erikj/search
...
Implement rank function for SQLite FTS
2015-10-23 15:27:51 +01:00
Erik Johnston
0c36098c1f
Implement rank function for SQLite FTS
2015-10-23 13:23:48 +01:00
Daniel Wagner-Hall
216c976399
Merge pull request #323 from matrix-org/daniel/sizelimits
...
Reject events which are too large
2015-10-23 11:26:03 +01: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
Mark Haines
b051781ddb
Merge pull request #325 from matrix-org/markjh/filter_dicts
...
Support filtering events represented as dicts.
2015-10-22 17:14:52 +01:00
Mark Haines
4e05aab4f7
Don't assume that the event has a room_id or sender
2015-10-22 17:08:59 +01:00
Erik Johnston
671ac699f1
Actually filter results
2015-10-22 16:54:56 +01:00
Mark Haines
9b6f3bc742
Support filtering events represented as dicts.
...
This is useful because the emphemeral events such as presence and
typing are represented as dicts inside synapse.
2015-10-22 16:38:03 +01:00
Erik Johnston
2980136d75
Rename
2015-10-22 16:19:53 +01:00
Erik Johnston
fb0fecd0b9
LESS THAN
2015-10-22 16:18:35 +01:00
Erik Johnston
61547106f5
Fix receipts for room initial sync
2015-10-22 16:17:23 +01:00
Erik Johnston
232beb3a3c
Use namedtuple as return value
2015-10-22 15:02:35 +01:00
Erik Johnston
ba02bba88c
Limit max number of SQL vars
2015-10-22 13:25:27 +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
8a98f0dc5b
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-10-22 13:16:35 +01:00
Erik Johnston
c9c82e8f4d
Merge pull request #320 from matrix-org/appservice-retry-cap
...
Cap the time to retry txns to appservices to 8.5 minutes
2015-10-22 13:15:54 +01:00
Daniel Wagner-Hall
e60dad86ba
Reject events which are too large
...
SPEC-222
2015-10-22 11:44:31 +01:00
Erik Johnston
f142898f52
PEP8
2015-10-22 11:18:01 +01:00
Erik Johnston
4d25bc6c92
Move FTS to delta 25
2015-10-22 11:12:28 +01:00
Erik Johnston
5025ba959f
Add config option to disable password login
2015-10-22 10:37:04 +01:00
Mark Haines
5201c66108
Merge branch 'develop' into markjh/v2_sync_typing
...
Conflicts:
synapse/handlers/sync.py
2015-10-21 15:48:34 +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
Mark Haines
d63a0ca34b
Doc string for the SyncHandler.typing_by_room method
2015-10-21 15:45:37 +01:00
Mark Haines
e3d75f564a
Include banned rooms in the archived section of v2 sync
2015-10-21 11:15:48 +01:00
Kegsay
8627048787
Merge pull request #318 from matrix-org/syn-502-login-bad-emails
...
Don't 500 on /login when the email doesn't map to a valid user ID.
2015-10-21 10:16:33 +01:00
Kegan Dougal
4dec901c76
Cap the time to retry txns to appservices to 8.5 minutes
...
There's been numerous issues with people playing around with their
application service and then not receiving events from their HS for
ages due to backoff timers reaching crazy heights (albeit capped at
< 1 day).
Reduce the max time between pokes to be 8.5 minutes (2^9 secs) which
is quick enough for people to wait it out (avg wait time being 4.25 min)
but long enough to actually give the AS breathing room if it needs it.
2015-10-21 10:10:55 +01:00
Erik Johnston
5c41224a89
Filter room ids before hitting the database
2015-10-21 10:09:26 +01:00
Erik Johnston
c8baada94a
Filter search results
2015-10-21 10:08:53 +01:00
Kegan Dougal
ede07434e0
Use 403 and message to match handlers/auth
2015-10-21 09:42:07 +01:00
Mark Haines
7be06680ed
Include typing events in initial v2 sync
2015-10-20 16:36:20 +01:00
Erik Johnston
87deec824a
Docstring
2015-10-20 15:47:42 +01:00
Erik Johnston
45cd2b0233
Refactor api.filtering to have a Filter API
2015-10-20 15:33:25 +01:00
Daniel Wagner-Hall
137fafce4e
Allow rejecting invites
...
This is done by using the same /leave flow as you would use if you had
already accepted the invite and wanted to leave.
2015-10-20 11:58:58 +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
51d03e65b2
Fix pep8
2015-10-19 17:48:58 +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
Daniel Wagner-Hall
9261ef3a15
Merge pull request #312 from matrix-org/daniel/3pidinvites
...
Stuff signed data in a standalone object
2015-10-19 15:52:34 +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
Paul "LeoNerd" Evans
243a79d291
Surely we don't need to preserve 'events_default' twice
2015-10-16 18:25:19 +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
Daniel Wagner-Hall
0e5239ffc3
Stuff signed data in a standalone object
...
Makes both generating it in sydent, and verifying it here, simpler at
the cost of some repetition
2015-10-16 17:45:48 +01:00
Mark Haines
b19b9535f6
Merge pull request #310 from matrix-org/markjh/bcrypt_rounds
...
Add config for how many bcrypt rounds to use for password hashes
2015-10-16 17:05:21 +01:00
Erik Johnston
46d39343d9
Explicitly check for Sqlite3Engine
2015-10-16 16:58:00 +01:00
Erik Johnston
f2d698cb52
Typing
2015-10-16 16:46:48 +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
380f148db7
Remove unused import
2015-10-16 15:32:56 +01:00
Mark Haines
fc012aa8dc
Fix FilteringStore.get_user_filter to work with postgres
2015-10-16 15:28:43 +01:00
Daniel Wagner-Hall
e5acc8a47b
Merge pull request #302 from matrix-org/daniel/3pidinvites
...
Implement third party identifier invites
2015-10-16 15:23:30 +01:00
Erik Johnston
d4b5621e0a
Remove duplicate _filter_events_for_client
2015-10-16 15:19:52 +01:00
Erik Johnston
23ed7dc0e7
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-10-16 15:18:42 +01:00
Daniel Wagner-Hall
c225d63e9e
Add signing host and keyname to signatures
2015-10-16 15:07:56 +01:00
Daniel Wagner-Hall
b8dd5b1a2d
Verify third party ID server certificates
2015-10-16 14:54:54 +01:00
Erik Johnston
366af6b73a
Amalgamate _filter_events_for_client
2015-10-16 14:52:48 +01:00
Mark Haines
f2f031fd57
Add config for how many bcrypt rounds to use for password hashes
...
By default we leave it at the default value of 12. But now we can reduce
it for preparing users for loadtests or running integration tests.
2015-10-16 14:52:08 +01:00
Erik Johnston
12122bfc36
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-10-16 14:46:32 +01:00
Erik Johnston
edb998ba23
Explicitly check for Sqlite3Engine
2015-10-16 14:37:14 +01:00
Erik Johnston
b62da463e1
docstring
2015-10-16 11:52:16 +01:00
Erik Johnston
3cf9948b8d
Add docstring
2015-10-16 11:28:12 +01:00
Erik Johnston
73260ad01f
Comment on the LIMIT 500
2015-10-16 11:24:02 +01:00
Erik Johnston
22a8c91448
Split up run_upgrade
2015-10-16 11:19:44 +01:00
Mark Haines
6296590bf7
Encode the filter JSON as UTF-8 before storing in the database.
...
Because we are using a binary column type to store the filter JSON.
2015-10-16 10:50:32 +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
Erik Johnston
8189c4e3fd
Bump version
2015-10-15 15:29:00 +01:00
Daniel Wagner-Hall
6ffbcf45c6
Use non-placeholder name for endpoint
2015-10-15 13:12:52 +01:00
Daniel Wagner-Hall
643b5fcdc8
Look for keys on the right objects
2015-10-15 13:10:30 +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
Mark Haines
5338220d3a
synapse.util.emailutils was unused
2015-10-15 10:39:33 +01:00
Mark Haines
a059760954
Merge pull request #305 from matrix-org/markjh/v2_sync_api
...
Update the v2 sync API to work as specified in the current spec.
2015-10-14 13:56:23 +01:00
Mark Haines
c185c1c413
Fix v2 sync polling
2015-10-14 13:16:53 +01:00
Mark Haines
f50c43464c
Merge branch 'develop' into markjh/v2_sync_api
2015-10-14 11:40:45 +01:00
Erik Johnston
f45aaf0e35
Remove unused constatns
2015-10-14 10:36:55 +01:00
Erik Johnston
8c9df8774e
Make 'keys' optional
2015-10-14 10:35:50 +01:00
Erik Johnston
99c7fbfef7
Fix to work with SQLite
2015-10-14 09:52:40 +01:00
Erik Johnston
1d9e109820
More TODO markers
2015-10-14 09:49:00 +01:00
Erik Johnston
d25b0f65ea
Add TODO markers
2015-10-14 09:46:31 +01:00
Erik Johnston
858634e1d0
Remove unused room_id arg
2015-10-14 09:31:20 +01:00
Mark Haines
474274583f
Merge pull request #303 from matrix-org/markjh/twisted_debugging
...
Bounce all deferreds through the reactor to make debugging easier.
2015-10-13 18:40:57 +01:00
Daniel Wagner-Hall
d82c5f7b5c
Use more descriptive error code
2015-10-13 18:02:00 +01:00
Daniel Wagner-Hall
0c38e8637f
Remove unnecessary class-wrapping
2015-10-13 18:00:38 +01:00
Mark Haines
9020860479
Only turn on the twisted deferred debugging if full_twisted_stacktraces is set in the config
2015-10-13 17:50:44 +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
bb407cd624
Re-add accidentally removed code
2015-10-13 17:19:26 +01:00
Mark Haines
32d66738b0
Fix pep8 warnings.
2015-10-13 17:18:29 +01:00
Daniel Wagner-Hall
95e53ac535
Add some docstring
2015-10-13 17:18:24 +01:00
Mark Haines
7639c3d9e5
Bounce all deferreds through the reactor to make debugging easier.
...
If all deferreds wait a reactor tick before resolving then there is
always a chance to add an errback to the deferred so that stacktraces
get reported, rather than being discarded.
2015-10-13 17:13:04 +01:00
Erik Johnston
7ecd11accb
Add paranoia limit
2015-10-13 15:50:56 +01:00
Daniel Wagner-Hall
17dffef5ec
Move event contents into third_party_layout field
2015-10-13 15:48:12 +01:00
Erik Johnston
3e2a1297b5
Remove constraints in preperation of using filters
2015-10-13 15:22:14 +01:00
Erik Johnston
323d3e506d
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-10-13 14:34:01 +01:00
Mark Haines
2fa9e23e04
Update the v2 filters to support filtering presence and remove support for public/private user data
2015-10-13 14:12:43 +01:00
Mark Haines
cacf0688c6
Add a get_invites_for_user method to the storage to find out the rooms a user is invited to
2015-10-13 14:08:38 +01:00
Erik Johnston
88971fd034
Merge branch 'erikj/store_engine' into erikj/search
2015-10-13 14:03:30 +01:00
Erik Johnston
17c80c8a3d
rename schema_prepare to prepare_database
2015-10-13 13:56:22 +01:00
Erik Johnston
cfd39d6b55
Add SQLite support
2015-10-13 13:47:50 +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
Erik Johnston
ec398af41c
Expose error more nicely
2015-10-13 11:43:43 +01:00
Mark Haines
54414221e4
Include invites in incremental sync
2015-10-13 11:43:12 +01:00
Erik Johnston
40b6a5aad1
Split out the schema preparation and update logic into its own module
2015-10-13 11:38:48 +01:00
Mark Haines
ab9cf73258
Include invited rooms in the initial sync
2015-10-13 11:03:48 +01:00
Erik Johnston
30c2783d2f
Search left rooms too
2015-10-13 10:36:36 +01:00
Erik Johnston
1a40afa756
Add sqlite schema
2015-10-13 10:36:25 +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
Erik Johnston
427943907f
Merge pull request #299 from stevenhammerton/sh-cas-required-attribute
...
SH CAS Required Attribute
2015-10-12 16:08:34 +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
ca53ad7425
Filter events to only thsoe that the user is allowed to see
2015-10-12 15:52:55 +01:00
Erik Johnston
f6fde343a1
Merge remote-tracking branch 'origin/develop' into erikj/search
2015-10-12 15:06:18 +01:00
Erik Johnston
927004e349
Remove unused room_id parameter
2015-10-12 15:06:14 +01:00
Steven Hammerton
83b464e4f7
Unpack dictionary in for loop for nicer syntax
2015-10-12 15:05:34 +01:00
Steven Hammerton
ab7f9bb861
Default cas_required_attributes to empty dictionary
2015-10-12 14:58:59 +01:00
Mark Haines
54cb509d64
Merge pull request #296 from matrix-org/markjh/eventstream_presence
...
Split the sections of EventStreamHandler.get_stream that handle presence
2015-10-12 14:48:09 +01:00
Mark Haines
885301486c
Merge pull request #297 from matrix-org/markjh/presence_races
...
Fix some races in the synapse presence handler caused by not yielding…
2015-10-12 14:47:53 +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
ae72e247fa
PEP8
2015-10-12 10:50:46 +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
Erik Johnston
a80ef851f7
Fix previous merge to s/version_string/user_agent/
2015-10-10 12:35:39 +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
1a46daf621
Merge branch 'markjh/presence_races' into markjh/v2_sync_api
2015-10-09 20:02:30 +01:00
Mark Haines
987803781e
Fix some races in the synapse presence handler caused by not yielding on deferreds
2015-10-09 19:59:50 +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
1b9802a0d9
Split the sections of EventStreamHandler.get_stream that handle presence
...
into separate functions.
This makes the code a bit easier to read, and means that we can reuse
the logic when implementing the v2 sync API.
2015-10-09 19:13:08 +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
ce19fc0f11
Merge pull request #294 from matrix-org/markjh/initial_sync_archived_flag
...
Add a flag to initial sync to include we want rooms that the user has left
2015-10-09 10:32:27 +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
David Baker
91482cd6a0
Use raw string for regex here, otherwise \b is the backspace character. Fixes displayname matching.
2015-10-08 11:22:15 +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
7c809abe86
Merge branch 'develop' into daniel/3pidinvites
2015-10-06 10:24:32 -05:00
Daniel Wagner-Hall
db6e1e1fe3
Merge pull request #292 from matrix-org/daniel/useragent
...
Allow synapse's useragent to be customized
2015-10-06 10:23:21 -05:00
Daniel Wagner-Hall
61ee72517c
Remove merge thinko
2015-10-06 10:16:15 -05:00
Daniel Wagner-Hall
1cacc71050
Add third party invites to auth_events for joins
2015-10-06 10:13:28 -05:00
Daniel Wagner-Hall
fcd9ba8802
Fix lint errors
2015-10-06 10:13:05 -05:00
Mark Haines
93cc60e805
Remove log line that was generated whenever an error was created. We are now creating error objects that aren't raised so it's probably a bit too confusing to keep
2015-10-06 16:10:19 +01:00
Daniel Wagner-Hall
d4bb28c59b
Revert "Revert "Merge pull request #283 from matrix-org/erikj/atomic_join_federation""
...
This reverts commit 34d26d3687
.
2015-10-06 09:58:21 -05:00
Daniel Wagner-Hall
ca6496c27c
Merge branch 'daniel/useragent' into daniel/3pidinvites
2015-10-06 09:55:21 -05:00
Daniel Wagner-Hall
492beb62a8
Use space not dash as delimiter
2015-10-06 09:53:33 -05:00
Daniel Wagner-Hall
e0b466bcfd
Use space not dash as delimiter
2015-10-06 09:32:26 -05:00
Daniel Wagner-Hall
287c81abf3
Merge branch 'develop' into daniel/useragent
2015-10-06 09:30:17 -05:00
Daniel Wagner-Hall
c05b5ef7b0
Merge branch 'develop' into daniel/3pidinvites
2015-10-06 08:10:34 -05:00
Daniel Wagner-Hall
ddd079c8f8
Merge branch 'daniel/useragent' into daniel/3pidinvites
2015-10-05 20:52:15 -05:00
Daniel Wagner-Hall
b28c7da0a4
Preserve version string in user agent
2015-10-05 20:49:39 -05:00
Daniel Wagner-Hall
34d26d3687
Revert "Merge pull request #283 from matrix-org/erikj/atomic_join_federation"
...
This reverts commit 5879edbb09
, reversing
changes made to b43930d4c9
.
2015-10-05 19:10:47 -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
Daniel Wagner-Hall
8fc52bc56a
Allow synapse's useragent to be customized
...
This will allow me to write tests which verify which server made HTTP
requests in a federation context.
2015-10-02 17:13:51 -05:00
Erik Johnston
49ebd472fa
Explicitly add Create event as auth event
2015-10-02 13:22:36 +01:00
Erik Johnston
40017a9a11
Add 'trusted_private_chat' to room creation presets
2015-10-02 11:22:56 +01:00
Erik Johnston
a086b7aa00
Merge pull request #275 from matrix-org/erikj/invite_state
...
Bundle in some room state in invites.
2015-10-02 11:15:43 +01:00
Erik Johnston
9c311dfce5
Also bundle in sender
2015-10-02 11:04:23 +01:00
Erik Johnston
d5e081c7ae
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/unfederatable
2015-10-02 10:33:49 +01:00
Erik Johnston
5879edbb09
Merge pull request #283 from matrix-org/erikj/atomic_join_federation
...
Atomically persist events when joining a room over federation/
2015-10-02 09:18:44 +01: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
Erik Johnston
0a4b7226fc
Don't change cwd in synctl
2015-10-01 09:21:36 +01:00
Erik Johnston
0ec78b360c
Merge pull request #287 from matrix-org/erikj/canonical_alias
...
Set m.room.canonical_alias on room creation.
2015-09-30 17:14:55 +01:00
Erik Johnston
ecd0c0dfc5
Remove double indentation
2015-09-30 16:46:24 +01:00
Erik Johnston
83892d0d30
Comment
2015-09-30 16:41:48 +01:00
Erik Johnston
9d39615b7d
Rename var
2015-09-30 16:37:59 +01:00
Mark Haines
301141515a
Merge pull request #288 from matrix-org/markjh/unused_definitions
...
Remove some of the unused definitions from synapse
2015-09-28 14:22:44 +01:00
Erik Johnston
a14665bde7
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/invite_state
2015-09-25 11:38:28 +01:00
Daniel Wagner-Hall
f87a11e0fd
Fix restart
2015-09-24 21:59:38 +00:00
Daniel Wagner-Hall
76328b85f6
Allow config file path to be configurable in in synctl
...
Also, allow it to be run from directories other than the synapse directory
2015-09-24 21:50:20 +00:00
Erik Johnston
17795161c3
Merge pull request #289 from matrix-org/markjh/fix_sql
...
Fix order of ON constraints in _get_rooms_for_user_where_membership
2015-09-24 17:39:47 +01:00
Mark Haines
cf1100887b
Fix order of ON constraints in _get_rooms_for_user_where_membership_is_txn
2015-09-24 17:35:10 +01:00
Mark Haines
1cd65a8d1e
synapse/storage/state.py: _make_group_id was unused
2015-09-23 10:37:58 +01:00
Mark Haines
973ebb66ba
Remove unused functions from synapse/storage/signatures.py
2015-09-23 10:36:33 +01:00
Mark Haines
e51aa4be96
synapse/storage/roommember.py:_get_members_query was unused
2015-09-23 10:35:10 +01:00
Mark Haines
92d8d724c5
Remove unused functions from synapse/storage/events.py
2015-09-23 10:33:06 +01:00
Mark Haines
c292dba70c
Remove unused functions from synapse/storage/event_federation.py
2015-09-23 10:31:25 +01:00
Mark Haines
396834f1c0
synapse/storage/_base.py:_simple_max_id was unused
2015-09-23 10:30:38 +01:00
Mark Haines
1d9036aff2
synapse/storage/_base.py:_simple_delete was unused
2015-09-23 10:30:25 +01:00
Mark Haines
1ee3d26432
synapse/storage/_base.py:_simple_selectupdate_one was unused
2015-09-23 10:30:03 +01:00
Mark Haines
82b8d4b86a
synapse/state.py:_get_state_key_from_event was unused
2015-09-23 10:27:47 +01:00
Mark Haines
57338a9768
synapse/handlers/room.py:_should_invite_join was unused
2015-09-23 10:26:45 +01:00
Mark Haines
60728c8c9e
synapse/handlers/federation.py:_handle_auth_events was unused
2015-09-23 10:25:26 +01:00
Erik Johnston
257fa1c53e
Set m.room.canonical_alias on room creation.
2015-09-23 10:07:31 +01:00
Erik Johnston
d2fc591619
Merge pull request #282 from matrix-org/erikj/missing_keys
...
Fix bug where we sometimes didn't fetch all the keys requested for a server.
2015-09-23 09:22:01 +01:00
Erik Johnston
dc6094b908
Merge pull request #271 from matrix-org/erikj/default_history
...
Change default history visibility for private rooms
2015-09-23 09:21:00 +01:00
Mark Haines
3559a835a2
synapse/storage/event_federation.py:_get_auth_events is unused
2015-09-22 18:39:46 +01:00
Mark Haines
7dd4f79c49
synapse/storage/_base.py:_execute_and_decode was unused
2015-09-22 18:37:07 +01:00
Mark Haines
bb4dddd6c4
Move NullSource out of synapse and into tests since it is only used by the tests
2015-09-22 18:33:34 +01:00
Mark Haines
7a5818ed81
Note that GzipFile was removed in comment that referenced it
2015-09-22 18:27:22 +01:00
Mark Haines
184ba0968a
synapse/app/homeserver.py:GzipFile was unused
2015-09-22 18:25:30 +01:00
Mark Haines
a247729806
synapse/streams/events.py:StreamSource was unused
2015-09-22 18:19:49 +01:00
Mark Haines
f2fcc0a8cf
synapse/api/errors.py:RoomError was unused
2015-09-22 18:18:45 +01:00
Mark Haines
372ac60375
synapse/util/__init__.py:unwrap_deferred was unused
2015-09-22 18:16:07 +01:00
Mark Haines
527d95dea0
synapse/storage/_base.py:Table was unused
2015-09-22 18:14:15 +01:00
Mark Haines
ca2abf9a6e
Merge pull request #286 from matrix-org/markjh/stream_config_repr
...
Define __repr__ methods for StreamConfig and PaginationConfig
2015-09-22 15:19:53 +01:00
Mark Haines
b35baf6f3c
Define __repr__ methods for StreamConfig and PaginationConfig
...
So that they can be used with "%r" log formats.
2015-09-22 15:13:10 +01:00
Daniel Wagner-Hall
6d59ffe1ce
Add some docstrings
2015-09-22 13:47:40 +01:00
Daniel Wagner-Hall
b6e0303c83
Catch stats-reporting errors
2015-09-22 13:34:29 +01:00
Daniel Wagner-Hall
eb011cd99b
Add docstring
2015-09-22 13:29:36 +01:00
Daniel Wagner-Hall
6d7f291b93
Front-load spaces
2015-09-22 13:13:07 +01:00
Daniel Wagner-Hall
7213588083
Implement configurable stats reporting
...
SYN-287
This requires that HS owners either opt in or out of stats reporting.
When --generate-config is passed, --report-stats must be specified
If an already-generated config is used, and doesn't have the
report_stats key, it is requested to be set.
2015-09-22 12:57:40 +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
Mark Haines
49c0a0b5c4
Clarify that room_initial_sync returns a python dict
2015-09-21 14:21:03 +01:00
Mark Haines
95c304e3f9
Fix doc string to point at the right class
2015-09-21 14:18:47 +01:00
Mark Haines
0c16285989
Add explicit "elif event.membership == Membership.LEAVE" for clarity
2015-09-21 14:17:16 +01:00
Mark Haines
1e101ed4a4
Clamp the "to" token for /rooms/{roomId}/messages to when the user left
...
the room.
There isn't a way for the client to learn a valid "to" token for a room
that they have left in the C-S API but that doesn't stop a client making
one up.
2015-09-21 14:13:10 +01:00
Mark Haines
8e3bbc9bd0
Clarify which event is returned by check_user_was_in_room
2015-09-21 13:47:44 +01:00
Mark Haines
0b5c9adeb5
Merge pull request #267 from matrix-org/markjh/missing_requirements
...
Print an example "pip install" line for a missing requirement
2015-09-18 18:52:08 +01:00
Erik Johnston
b105996fc1
Remove run_on_reactor
2015-09-17 10:28:36 +01:00
Erik Johnston
c34ffd2736
Fix getting an event for a room the server forgot it was in
2015-09-17 10:26:03 +01:00
Erik Johnston
54e688277a
Also persist state
2015-09-17 10:26:03 +01:00
Erik Johnston
3a01901d6c
Capture err
2015-09-17 10:26:03 +01:00
Erik Johnston
744e7d2790
Also handle state
2015-09-17 10:26:03 +01:00
Erik Johnston
a3e332af19
Don't bail out of joining if we encounter a rejected event
2015-09-17 10:26:03 +01:00
Erik Johnston
4678055173
Refactor do_invite_join
2015-09-17 10:24:51 +01:00
Erik Johnston
ffe8cf7e59
Fix bug where we sometimes didn't fetch all the keys requested for a
...
server.
2015-09-17 10:21:32 +01:00
Erik Johnston
eb700cdc38
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-09-16 11:05:34 +01:00
Erik Johnston
663b96ae96
Merge branch 'erikj/update_extremeties' into hotfixes-v0.10.0-r2
2015-09-16 09:54:42 +01:00
Erik Johnston
2048388cfd
Merge pull request #281 from matrix-org/erikj/update_extremeties
...
When updating a stored event from outlier to non-outlier, remember to update the extremeties
2015-09-15 16:57:25 +01:00
Erik Johnston
8148c48f11
"Comments"
2015-09-15 16:54:48 +01:00
Daniel Wagner-Hall
2c8f16257a
Merge pull request #272 from matrix-org/daniel/insecureclient
...
Allow configuration to ignore invalid SSL certs
2015-09-15 16:52:38 +01:00
Erik Johnston
1107e83b54
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-09-15 16:35:34 +01:00
Erik Johnston
3b05b67c89
When updating a stored event from outlier to non-outlier, remember to update the extremeties
2015-09-15 16:34:42 +01:00
Daniel Wagner-Hall
d4af08a167
Use shorter config key name
2015-09-15 15:50:13 +01:00
Daniel Wagner-Hall
3bcbabc9fb
Rename context factory
...
Mjark is officially no fun.
2015-09-15 15:46:22 +01:00
Daniel Wagner-Hall
9fc0aad567
Merge branch 'master' into daniel/insecureclient
2015-09-15 15:42:44 +01:00
Paul "LeoNerd" Evans
9cd5b9a802
Hacky attempt at catching SIGHUP and rotating the logfile around
2015-09-14 19:03:53 +01:00
Daniel Wagner-Hall
728d07c8c1
Merge pull request #256 from matrix-org/auth
...
Attempt to validate macaroons
2015-09-14 18:09:33 +01:00
Erik Johnston
d59acb8c5b
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/unfederatable
2015-09-14 18:05:31 +01:00
Erik Johnston
91cb3b630d
Merge pull request #265 from matrix-org/erikj/check_room_exists
...
Check room exists when authenticating an event
2015-09-14 17:56:18 +01:00
Erik Johnston
dffc9c4ae0
Drop unused index
2015-09-14 14:41:37 +01:00
Mark Haines
e2054ce21a
Allow users to GET individual state events for rooms that they have left
2015-09-10 15:06:47 +01:00
Erik Johnston
49ae42bbe1
Bundle in some room state in the unsigned bit of the invite when sending to invited servers
2015-09-10 14:25:54 +01:00
David Baker
ca32c7a065
Fix adding threepids to an existing account
2015-09-10 10:44:56 +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
Erik Johnston
4ae73d16a9
Merge pull request #270 from matrix-org/markjh/fix_metrics
...
Fix the size reported by maxrss.
2015-09-10 10:32:10 +01:00
Erik Johnston
3f60481655
Bump version and change log
2015-09-10 09:58:32 +01:00
Erik Johnston
e1eb1f3fb9
Various bug fixes to crypto.keyring
2015-09-10 09:48:12 +01:00
Mark Haines
09cb5c7d33
Allow users that have left a room to get the messages that happend in the room before they left
2015-09-09 17:31:09 +01:00
Erik Johnston
dd0867f5ba
Various bug fixes to crypto.keyring
2015-09-09 17:02:39 +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
2c746382e0
Merge branch 'daniel/insecureclient' into develop
2015-09-09 14:27:30 +01:00
Mark Haines
1d579df664
Allow rooms/{roomId}/state for a room that has been left
2015-09-09 14:12:24 +01:00
Daniel Wagner-Hall
ddfe30ba83
Better document the intent of the insecure SSL setting
2015-09-09 13:26:23 +01:00
Mark Haines
89ae0166de
Allow room initialSync for users that have left the room, returning a snapshot of how the room was when they left it
2015-09-09 13:25:22 +01:00
Daniel Wagner-Hall
6485f03d91
Fix random formatting
2015-09-09 13:05:00 +01:00
Daniel Wagner-Hall
81a93ddcc8
Allow configuration to ignore invalid SSL certs
...
This will be useful for sytest, and sytest only, hence the aggressive
config key name.
2015-09-09 12:02:07 +01:00
Erik Johnston
e530208e68
Change default history visibility for private rooms
2015-09-09 09:57:49 +01:00
Mark Haines
dd42bb78d0
Include rooms that a user has left in an initialSync. Include the state and messages at the point they left the room
2015-09-08 18:16:09 +01:00
Mark Haines
417485eefa
Include the event_id and stream_ordering of membership events when looking up which rooms a user is in
2015-09-08 18:14:54 +01:00
Erik Johnston
2ff439cff7
Bump version/changelog
2015-09-08 11:01:48 +01:00
Mark Haines
709ba99afd
Check that /proc/self/fd exists before listing it
2015-09-07 16:45:55 +01:00
Mark Haines
9e4dacd5e7
The maxrss reported by getrusage is in kilobytes, not pages
2015-09-07 16:45:48 +01:00
Mark Haines
73e4ad4b8b
Merge branch 'master' into develop
...
Conflicts:
setup.py
2015-09-07 15:06:46 +01:00
Erik Johnston
1002bbd732
Change log level to info
2015-09-03 09:51:01 +01:00
Erik Johnston
9ad38c9807
Bump version and changelog
2015-09-03 09:49:54 +01:00
Erik Johnston
fd0a919af3
Lists use 'append'
2015-09-02 17:27:59 +01:00
Erik Johnston
e90f32646f
Bump version and changelog
2015-09-02 17:17:40 +01:00
Daniel Wagner-Hall
77580addc3
Merge pull request #262 from matrix-org/redactyoself
...
Allow users to redact their own events
2015-09-02 10:02:36 +01:00
Mark Haines
8bab7abddd
Add nacl.bindings to the list of modules checked. Re-arrange import order to check packages after the packages they depend on
2015-09-01 16:51:10 +01:00
Mark Haines
3cdfd37d95
Print an example "pip install" line for a missing requirement
2015-09-01 16:47:26 +01:00
Erik Johnston
9b05ef6f39
Also check the domains for membership state_keys
2015-09-01 16:17:25 +01:00
Erik Johnston
187320b019
Merge branch 'erikj/check_room_exists' into erikj/unfederatable
2015-09-01 15:58:10 +01:00
Erik Johnston
b345853918
Check against sender rather than event_id
2015-09-01 15:57:35 +01:00
Erik Johnston
a88e16152f
Add flag which disables federation of the room
2015-09-01 15:47:30 +01:00
Erik Johnston
00149c063b
Fix tests
2015-09-01 15:42:03 +01:00
Erik Johnston
ab9e01809d
Check room exists when authenticating an event, by asserting they reference a creation event
2015-09-01 15:21:24 +01:00
Mark Haines
57df6fffa7
Use the version of "matrix-angular-sdk" hosted on pypi
2015-09-01 14:47:57 +01:00
Erik Johnston
b62c1395d6
Merge branch 'release-v0.10.0' of github.com:matrix-org/synapse into develop
2015-09-01 13:11:55 +01:00
Daniel Wagner-Hall
e255c2c32f
s/user_id/user/g for consistency
2015-09-01 12:41:16 +01:00
Erik Johnston
9c8eb4a809
Merge pull request #261 from matrix-org/erikj/scripts_clean
...
Clean up scripts/
2015-09-01 11:55:26 +01:00
Daniel Wagner-Hall
b854a375b0
Check domain of events properly
...
Federated servers still need to delegate authority to owning servers
2015-09-01 11:53:31 +01:00
Erik Johnston
cd800ad99a
Lower size of 'stateGroupCache' now that we have data from matrix.org to support doing so
2015-09-01 10:09:03 +01:00
Matthew Hodgson
d71af2ee12
don't log the whole DB config (including postgres password...)
2015-08-29 22:23:21 +01:00
Daniel Wagner-Hall
b143641b20
Merge pull request #258 from matrix-org/slowtestsmakemesad
...
Swap out bcrypt for md5 in tests
2015-08-28 15:42:25 +01:00
Daniel Wagner-Hall
4d1ea40008
Merge branch 'develop' into redactyoself
...
Conflicts:
synapse/handlers/_base.py
2015-08-28 15:35:39 +01:00
Daniel Wagner-Hall
8256a8ece7
Allow users to redact their own events
2015-08-28 15:31:49 +01:00
Mark Haines
a7122692d9
Merge branch 'release-v0.10.0' into develop
...
Conflicts:
synapse/handlers/auth.py
synapse/python_dependencies.py
synapse/rest/client/v1/login.py
2015-08-28 11:15:27 +01:00
Erik Johnston
b442217d91
Actually add config path
2015-08-28 10:37:17 +01:00
Erik Johnston
5371c2a1f7
Bump version and changelog
2015-08-27 11:21:11 +01:00
Erik Johnston
ddf4d2bd98
Consistency
2015-08-27 10:50:49 +01:00
Erik Johnston
66ec6cf9b8
Check for an internationalised filename first
2015-08-27 10:48:58 +01:00
Erik Johnston
53c2eed862
None check the correct variable
2015-08-27 10:38:22 +01:00
Erik Johnston
f02532baad
Check for None
2015-08-27 10:37:02 +01:00
Erik Johnston
25b32b63ae
Bump changelog and version
2015-08-27 10:09:32 +01:00
Mark Haines
c9cb354b58
Give a sensible error message if the filename is invalid UTF-8
2015-08-26 17:27:23 +01:00
Mark Haines
5a9e0c3682
Handle unicode filenames given when downloading or received over federation
2015-08-26 17:08:47 +01:00
Mark Haines
e85c7873dc
Allow non-ascii filenames for attachments
2015-08-26 16:26:37 +01:00
Daniel Wagner-Hall
86fac9c95e
Remove unused import
2015-08-26 16:03:17 +01:00
Daniel Wagner-Hall
3063383547
Swap out bcrypt for md5 in tests
...
This reduces our ~8 second sequential test time down to ~7 seconds
2015-08-26 15:59:32 +01:00
Daniel Wagner-Hall
37f0ddca5f
Merge branch 'mergeeriksmadness' into auth
2015-08-26 13:45:06 +01:00
Daniel Wagner-Hall
d3c0e48859
Merge erikj/user_dedup to develop
2015-08-26 13:42:45 +01:00
Daniel Wagner-Hall
6a4b650d8a
Attempt to validate macaroons
...
A couple of weird caveats:
* If we can't validate your macaroon, we fall back to checking that
your access token is in the DB, and ignoring the failure
* Even if we can validate your macaroon, we still have to hit the DB to
get the access token ID, which we pretend is a device ID all over the
codebase.
This mostly adds the interesting code, and points out the two pieces we
need to delete (and necessary conditions) in order to fix the above
caveats.
2015-08-26 13:22:23 +01:00
Erik Johnston
da51acf0e7
Remove needless existence checks
2015-08-26 11:08:23 +01:00
Erik Johnston
f4d552589e
Don't loop over all rooms ever in typing.get_new_events_for_user
2015-08-26 10:51:08 +01:00
Erik Johnston
90fde4b8d7
Bump changelog and version
2015-08-25 17:49:58 +01:00
Erik Johnston
0de2aad061
Merge pull request #250 from matrix-org/erikj/generated_directory
...
Add config option to specify where generated files should be dumped
2015-08-25 17:40:19 +01:00
Erik Johnston
3f6f74686a
Update config doc
2015-08-25 17:37:21 +01:00
Erik Johnston
82145912c3
s/--generated-directory/--keys-directory/
2015-08-25 17:31:22 +01:00
Daniel Wagner-Hall
a2355fae7e
Merge pull request #251 from matrix-org/removeadmin
...
Stop looking up "admin", which we never read
2015-08-25 17:23:05 +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
Erik Johnston
3e1029fe80
Warn if we encounter unexpected files in config directories
2015-08-25 17:08:23 +01:00
Erik Johnston
af7c1397d1
Add config option to specify where generated files should be dumped
2015-08-25 16:58:01 +01:00
Daniel Wagner-Hall
460cad7c11
Merge branch 'deviceid' into removeadmin
2015-08-25 16:37:59 +01:00
Daniel Wagner-Hall
825f0875bc
Fix up one more reference
2015-08-25 16:37:37 +01:00
Daniel Wagner-Hall
a9d8bd95e7
Stop looking up "admin", which we never read
2015-08-25 16:29:39 +01:00
Erik Johnston
bfb66773a4
Allow specifying directories as config files
2015-08-25 16:25:54 +01:00
Daniel Wagner-Hall
57619d6058
Re-wrap line
2015-08-25 16:25:46 +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
Erik Johnston
747535f20f
Merge pull request #245 from matrix-org/erikj/configurable_client_location
...
Allow specifying a directory to host a web client from
2015-08-25 15:50:25 +01:00
Erik Johnston
1d1c303b9b
Fix typo when using sys.stderr.write
2015-08-25 15:39:16 +01:00
Erik Johnston
d33f31d741
Print the correct pip install line when failing due to lack of matrix-angular-sdk
2015-08-25 15:33:23 +01:00
Erik Johnston
f63208a1c0
Add utility to parse config and print out a key
...
Usage:
```
$ python -m synapse.config read server_name -c homeserver.yaml
localhost
```
2015-08-25 15:16:31 +01:00
Erik Johnston
37403ab06c
Update the log message
2015-08-25 14:19:09 +01:00
Erik Johnston
8b52fe48b5
Revert previous commit. Instead, always download matrix-angular-sdk as a requirement, but don't complain (when we do check_requirements) if we don't have it when we start synapse.
2015-08-25 14:10:31 +01:00
Erik Johnston
d9088c923f
Remove dependency on matrix-angular-sdk
2015-08-25 13:34:50 +01:00
Erik Johnston
86cef6a91b
Allow specifying a directory to host a web client from
2015-08-25 12:01:23 +01:00
Mark Haines
1c847af28a
Merge pull request #243 from matrix-org/markjh/remove_syutil
...
Replace syutil dependency with smaller, single-purpose libraries
2015-08-25 10:52:16 +01:00
Mark Haines
cf8c04948f
Fix typo in module imports and package dependencies
2015-08-25 10:42:59 +01:00
Mark Haines
037481a033
Remove autoincrement since we incrementing the ID in the storage layer
2015-08-24 17:48:57 +01:00
Mark Haines
01fc3943f1
Fix indent
2015-08-24 17:18:58 +01:00
Erik Johnston
571ac105e6
Bump version and changelog
2015-08-24 17:10:45 +01:00
Erik Johnston
51c53369a3
Do auth checks *before* persisting the event
2015-08-24 16:38:20 +01:00
Erik Johnston
f8f3d72e2b
Don't make pushers handle presence/typing events
2015-08-24 16:19:43 +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
457970c724
Don't insert events into 'event_*_extremeties' tables if they're outliers
2015-08-23 13:44:23 +01:00
Erik Johnston
1bd1a43073
Actually check if event_id isn't returned by _get_state_groups
2015-08-21 14:30:34 +01:00
Erik Johnston
fd5ad0f00e
Doc string
2015-08-21 11:45:43 +01:00
Erik Johnston
745b72660a
Merge branch 'release-v0.10.0' of github.com:matrix-org/synapse into develop
2015-08-21 11:39: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
Erik Johnston
aa3c9c7bd0
Don't allow people to register user ids which only differ by case to an existing one
2015-08-21 10:57:47 +01:00
Erik Johnston
1f7642efa9
Fix bug where we didn't correctly serialize the redacted_because key over federation
2015-08-21 09:36:07 +01:00
Erik Johnston
3e9ee62db0
Add missing param in store.get_state_groups invocation
2015-08-21 09:15:13 +01:00
David Baker
21b71b6d7c
Return fully qualified user_id as per spec
2015-08-20 21:54:53 +01:00
Daniel Wagner-Hall
c7788685b0
Fix bad merge
2015-08-20 17:43:12 +01:00
Daniel Wagner-Hall
8c74bd8960
Fix indentation
2015-08-20 17:26:52 +01:00
Daniel Wagner-Hall
ea570ffaeb
Fix flake8 warnings
2015-08-20 17:22:41 +01:00
Daniel Wagner-Hall
d5a825edee
Merge branch 'auth' into refresh
...
Conflicts:
synapse/handlers/register.py
2015-08-20 17:13:33 +01:00
Daniel Wagner-Hall
225c244aba
Remove incorrect whitespace
2015-08-20 17:10:10 +01:00
Daniel Wagner-Hall
4e706ec82c
Merge branch 'develop' into auth
2015-08-20 16:59:41 +01:00
Daniel Wagner-Hall
f90ea3dc73
Correct pynacl version to 0.3.0
...
0.0.3 was a typo
2015-08-20 16:42:17 +01:00
Daniel Wagner-Hall
ce2a7ed6e4
Merge branch 'develop' into auth
2015-08-20 16:28:36 +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
Erik Johnston
3befc9ccc3
Merge branch 'release-v0.10.0' of github.com:matrix-org/synapse into develop
2015-08-20 16:09:27 +01:00
Erik Johnston
c141d47a28
Merge pull request #235 from matrix-org/erikj/room_avatars
...
Add m.room.avatar to default power levels.
2015-08-20 16:07:49 +01:00
Daniel Wagner-Hall
13a6517d89
s/by_token/by_access_token/g
...
We're about to have two kinds of token, access and refresh
2015-08-20 16:01:29 +01:00
David Baker
f764f92647
Remove spurious extra arg to set_password
2015-08-20 15:35:54 +01:00
David Baker
ca0d28ef34
Another use of check_password that got missed in the yield fix
2015-08-20 15:35:14 +01:00
Erik Johnston
9b63def388
Add m.room.avatar to default power levels. Change default required power levels of such events to 50
2015-08-20 14:35:40 +01:00
Erik Johnston
9d720223f2
Bump version and changelog
2015-08-20 14:12:01 +01:00
Daniel Wagner-Hall
617501dd2a
Move token generation to auth handler
...
I prefer the auth handler to worry about all auth, and register to call
into it as needed, than to smatter auth logic between the two.
2015-08-20 11:35:56 +01:00
Erik Johnston
099ce4bc38
Merge pull request #231 from matrix-org/erikj/pushers_store_last_token
...
Push: store the 'last_token' in the db, even if we processed no events
2015-08-20 11:27:31 +01:00
Mark Haines
22346a0ee7
Merge pull request #206 from matrix-org/erikj/generate_presice_thumbnails
...
Always return a thumbnail of the requested size.
2015-08-20 11:27:15 +01:00
Erik Johnston
cbd053bb8f
Merge pull request #233 from matrix-org/erikj/canonical_alias
...
Add server side support for canonical aliases
2015-08-20 11:26:09 +01:00
Daniel Wagner-Hall
ade5342752
Merge branch 'auth' into refresh
2015-08-20 11:03:47 +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
Erik Johnston
aadb2238c9
Check that the canonical room alias actually points to the room
2015-08-20 09:55:04 +01:00
Daniel Wagner-Hall
f9e7493ac2
Merge branch 'develop' into auth
2015-08-19 15:20:09 +01:00
Daniel Wagner-Hall
70e265e695
Re-add whitespace around caveat operators
2015-08-19 14:30:31 +01:00
Erik Johnston
daa01842f8
Don't get apservice interested rooms in RoomHandler.get_joined_rooms_for_users
2015-08-19 13:46:03 +01:00
Daniel Wagner-Hall
7f08ebb772
Switch to pymacaroons-pynacl
2015-08-19 13:21:36 +01:00
Erik Johnston
d7272f8d9d
Add canonical alias to the default power levels
2015-08-19 12:03:09 +01:00
Erik Johnston
78fa346b07
Store the 'last_token' in the db, even if we processed no events
2015-08-19 10:08:31 +01:00
Erik Johnston
a45ec7c651
Block on storing the current last_tokens
2015-08-19 10:08:12 +01:00
Erik Johnston
40da1f200d
Remove an access token log line
2015-08-19 09:41:07 +01:00
Erik Johnston
abc6986a24
Fix regression where we incorrectly responded with a 200 to /login
2015-08-19 09:31:11 +01:00
Daniel Wagner-Hall
ce832c38d4
Remove padding space around caveat operators
2015-08-18 17:39:26 +01:00
Erik Johnston
e624cdec64
Merge pull request #228 from matrix-org/erikj/_get_state_for_groups
...
Ensure we never return a None event from _get_state_for_groups
2015-08-18 16:30:17 +01:00
Erik Johnston
c3dd2ecd5e
Merge pull request #230 from matrix-org/erikj/appservice_auth_entity
...
Set request.authenticated_entity for application services
2015-08-18 16:30:11 +01:00
Erik Johnston
38a965b816
Merge pull request #227 from matrix-org/erikj/receipts_take2
...
Re-enable receipts API.
2015-08-18 16:30:04 +01:00
Erik Johnston
a82938416d
Remove newline because vertical whitespace makes mjark sad
2015-08-18 16:28:13 +01:00
Erik Johnston
0bfdaf1f4f
Rejig the code to make it nicer
2015-08-18 16:26:07 +01:00
Erik Johnston
a5cbd20001
Merge pull request #225 from matrix-org/erikj/reactor_metrics
...
Fix pending_calls metric to not lie
2015-08-18 16:21:11 +01:00
Erik Johnston
128ed32e6b
Bump size of get_presence_state cache
2015-08-18 15:51:23 +01:00
Daniel Wagner-Hall
3e6fdfda00
Fix some formatting to use tuples
2015-08-18 15:18:50 +01:00
Erik Johnston
ee59af9ac0
Set request.authenticated_entity for application services
2015-08-18 15:17:47 +01:00
Daniel Wagner-Hall
1469141023
Merge branch 'develop' into auth
2015-08-18 14:43:44 +01:00
Daniel Wagner-Hall
cacdb529ab
Remove accidentally added file
2015-08-18 14:27:23 +01:00
Daniel Wagner-Hall
2d3462714e
Issue macaroons as opaque auth tokens
...
This just replaces random bytes with macaroons. The macaroons are not
inspected by the client or server.
In particular, they claim to have an expiry time, but nothing verifies
that they have not expired.
Follow-up commits will actually enforce the expiration, and allow for
token refresh.
See https://bit.ly/matrix-auth for more information
2015-08-18 14:22:02 +01:00
Erik Johnston
f704c10f29
Rename unhelpful variable name
2015-08-18 11:54:03 +01:00
Erik Johnston
6e7d36a72c
Also check for presence of 'threadCallQueue' in reactor
2015-08-18 11:51:08 +01:00
Erik Johnston
d3da63f766
Use more helpful variable names
2015-08-18 11:47:00 +01:00
Erik Johnston
8199475ce0
Ensure we never return a None event from _get_state_for_groups
2015-08-18 11:44:10 +01:00
Erik Johnston
0d4abf7777
Typo
2015-08-18 11:19:08 +01:00
Erik Johnston
e55291ce5e
None check
2015-08-18 11:17:37 +01:00
Erik Johnston
8e254862f4
Don't assume @cachedList function returns keys for everything
2015-08-18 11:11:33 +01:00
Erik Johnston
85d0bc3bdc
Reduce cache size from obscenely large to quite large
2015-08-18 11:00:38 +01:00
Erik Johnston
cfc503681f
Comments
2015-08-18 10:49:23 +01:00
Erik Johnston
dc2a105fca
Merge pull request #226 from matrix-org/erikj/room_presence
...
Add and use cached batched storage.get_state function.
2015-08-18 10:43:50 +01:00
Erik Johnston
83eb627b5a
More helpful variable names
2015-08-18 10:33:11 +01:00
Erik Johnston
776ee6d92b
Doc strings
2015-08-18 10:30:07 +01:00
Erik Johnston
f72ed6c6a3
Remove debug try/catch
2015-08-18 10:29:49 +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
Erik Johnston
8f4165628b
Add index receipts_linearized_room_stream
2015-08-17 14:43:54 +01:00
Erik Johnston
d3d582bc1c
Remove unused import
2015-08-17 13:38:09 +01:00
Erik Johnston
4d8e1e1f9e
Remove added unused methods
2015-08-17 13:36:07 +01:00
Erik Johnston
afef6f5d16
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts_take2
2015-08-17 13:23:44 +01:00
Erik Johnston
2d97e65558
Remember to invalidate caches
2015-08-17 10:46:55 +01:00
Erik Johnston
1a9510bb84
Implement a batched presence_handler.get_state and use it
2015-08-17 10:40:23 +01:00
Erik Johnston
47abebfd6d
Add batched version of store.get_presence_state
2015-08-17 09:50:50 +01:00
Erik Johnston
f9d4da7f45
Fix bug where we were leaking None into state event lists
2015-08-17 09:39:45 +01:00
Daniel Wagner-Hall
30883d8409
Merge pull request #221 from matrix-org/auth
...
Simplify LoginHander and AuthHandler
2015-08-14 17:02:22 +01:00
Erik Johnston
891dfd90bd
Fix pending_calls metric to not lie
2015-08-14 15:43:11 +01:00
Erik Johnston
68b255c5a1
Batch _get_linearized_receipts_for_rooms
2015-08-14 15:06:22 +01:00
Mark Haines
95b0f5449d
Fix flake8 warning
2015-08-13 17:34:22 +01:00
Erik Johnston
129ee4e149
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts_take2
2015-08-13 17:28:43 +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
Mark Haines
0cceb2ac92
Add a few strategic new lines to break up the on_query_client_keys and on_claim_client_keys methods in federation_server.py
2015-08-13 17:27:46 +01:00
Mark Haines
b16cd18a86
Merge remote-tracking branch 'origin/develop' into erikj/generate_presice_thumbnails
2015-08-13 17:23:39 +01:00
Erik Johnston
9f7f228ec2
Remove pointless map
2015-08-13 17:20:59 +01:00
Erik Johnston
2bb2c02571
Remove some vertical space
2015-08-13 17:11:30 +01:00
Mark Haines
3d1cdda762
Merge branch 'develop' into erikj/reactor_metrics
2015-08-13 17:03:58 +01:00
Erik Johnston
57877b01d7
Replace list comprehension
2015-08-13 17:00:17 +01:00
Erik Johnston
5db5677969
Add metrics to the receipts cache
2015-08-13 16:58:23 +01:00
Erik Johnston
7e77a82c5f
Re-enable receipts
2015-08-13 16:58:10 +01:00
Erik Johnston
06750140f6
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-13 11:55:20 +01:00
Erik Johnston
adbd720fab
PEP8
2015-08-13 11:47:38 +01:00
Erik Johnston
8b7ce2945b
Merge branch 'erikj/reactor_metrics' into erikj/dictionary_cache
2015-08-13 11:42:22 +01:00
Erik Johnston
a6c27de1aa
Don't time getDelayedCalls
2015-08-13 11:41:57 +01:00
Erik Johnston
c044aca1fd
Merge branch 'erikj/reactor_metrics' into erikj/dictionary_cache
2015-08-13 11:39:38 +01:00
Erik Johnston
ba5d34a832
Add some metrics about the reactor
2015-08-13 11:38:59 +01:00
Mark Haines
21ac8be5f7
Depend on Twisted>=15.1 rather than pining to a particular version
2015-08-12 17:25:13 +01:00
Erik Johnston
0fbed2a8fa
Comment
2015-08-12 17:22:54 +01:00
Mark Haines
998a72d4d9
Merge branch 'develop' into markjh/twisted-15
...
Conflicts:
synapse/http/matrixfederationclient.py
2015-08-12 17:21:14 +01:00
Erik Johnston
c10ac7806e
Explain why we're prefilling dict with Nones
2015-08-12 17:16:30 +01:00
Erik Johnston
101ee3fd00
Better variable name
2015-08-12 17:08:05 +01:00
Erik Johnston
df361d08f7
Split _get_state_for_group_from_cache into two
2015-08-12 17:06:21 +01:00
Erik Johnston
7b0e797080
Fix _filter_events_for_client
2015-08-12 17:05:24 +01:00
Erik Johnston
cfa62007a3
Docstring
2015-08-12 16:42:46 +01:00
Daniel Wagner-Hall
5ce903e2f7
Merge password checking implementations
2015-08-12 16:09:19 +01:00
Erik Johnston
a7eeb34c64
Simplify staggered deferred lists
2015-08-12 16:02:05 +01:00
Erik Johnston
f7e2f981ea
Use list comprehension instead of filter
2015-08-12 16:01:10 +01:00
Daniel Wagner-Hall
bcc1d34d35
Merge branch 'develop' into auth
2015-08-12 15:58:52 +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
Mark Haines
de3b7b55d6
Doc-string for config ultility function
2015-08-12 14:29:17 +01:00
Erik Johnston
d46208c12c
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-12 14:28:43 +01:00
Erik Johnston
4f11a5b2b5
Merge pull request #220 from matrix-org/markjh/generate_keys
...
Fix the --generate-keys option.
2015-08-12 14:23:54 +01:00
Mark Haines
7bbaab9432
Fix the --generate-keys option. Make it do the same thing as --generate-config does when the config file exists, but without printing a warning
2015-08-12 11:57:37 +01:00
Mark Haines
fdb724cb70
Add config option for setting the list of thumbnail sizes to precalculate
2015-08-12 10:55:27 +01:00
Mark Haines
7e3d1c7d92
Make a config option for whether to generate new thumbnail sizes dynamically
2015-08-12 10:54:38 +01:00
Erik Johnston
d7451e0f22
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-12 10:30:30 +01:00
Erik Johnston
4807616e16
Wire up the dictionarycache to the metrics
2015-08-12 10:13:35 +01:00
Erik Johnston
2df8dd9b37
Move all the caches into their own package, synapse.util.caches
2015-08-11 18:00:59 +01:00
Daniel Wagner-Hall
45610305ea
Add missing space because linter
2015-08-11 16:43:27 +01:00
Daniel Wagner-Hall
88e03da39f
Minor docs cleanup
2015-08-11 16:35:28 +01:00
Daniel Wagner-Hall
9dba813234
Remove redundant if-guard
...
The startswith("@") does the job
2015-08-11 16:34:17 +01:00
Erik Johnston
53a817518b
Comments
2015-08-11 11:40:40 +01:00
Erik Johnston
6eaa116867
Comment
2015-08-11 11:35:24 +01:00
Erik Johnston
4762c276cb
Docs
2015-08-11 11:33:41 +01:00
Erik Johnston
dc8399ee00
Remove debug loggers
2015-08-11 11:30:59 +01:00
Erik Johnston
1b994a97dd
Fix application of ACLs
2015-08-11 10:41:40 +01:00
Erik Johnston
10b874067b
Fix state cache
2015-08-11 09:12:41 +01:00
Erik Johnston
017b798e4f
Clean up StateStore
2015-08-10 15:01:06 +01:00
Erik Johnston
2c019eea11
Remove unused function
2015-08-10 14:44:41 +01:00
Erik Johnston
bb0a475c30
Comments
2015-08-10 14:27:38 +01:00
Erik Johnston
dcefac3b06
Comments
2015-08-10 14:16:24 +01:00
Mark Haines
559c51debc
Use TypeError instead of ValueError and give a nicer error mesasge
...
when someone calls Cache.invalidate with the wrong type.
2015-08-10 14:07:17 +01:00
Erik Johnston
7ce71f2ffc
Merge branch 'erikj/cache_varargs_interface' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-10 13:47:51 +01:00
Erik Johnston
8c3a62b5c7
Merge pull request #215 from matrix-org/erikj/cache_varargs_interface
...
Change Cache to not use *args in its interface
2015-08-10 13:47:45 +01:00
Erik Johnston
86eaaa885b
Rename keyargs to args in CacheDescriptor
2015-08-10 13:44:44 +01:00
Erik Johnston
e0b6e49466
Merge branch 'erikj/cache_varargs_interface' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-10 10:39:22 +01:00
Erik Johnston
2cd6cb9f65
Rename keyargs to args in Cache
2015-08-10 10:38:47 +01:00
Erik Johnston
aa88582e00
Do bounds check
2015-08-10 10:08:15 +01:00
Erik Johnston
5119e416e8
Line length
2015-08-10 10:05:30 +01:00
Erik Johnston
8f04b6fa7a
Merge branch 'erikj/cache_varargs_interface' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-07 19:30:25 +01:00
Erik Johnston
7dec0b2bee
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-07 19:28:39 +01:00
Erik Johnston
06218ab125
Merge pull request #212 from matrix-org/erikj/cache_deferreds
...
Make CacheDescriptor cache deferreds rather than the deferreds' values
2015-08-07 19:28:05 +01:00
Erik Johnston
2352974aab
Merge branch 'erikj/cache_deferreds' of github.com:matrix-org/synapse into erikj/cache_varargs_interface
2015-08-07 19:26:54 +01:00
Erik Johnston
9c5385b53a
s/observed/observer/
2015-08-07 19:26:38 +01:00
Erik Johnston
ffab798a38
Merge branch 'erikj/cache_deferreds' of github.com:matrix-org/synapse into erikj/cache_varargs_interface
2015-08-07 19:18:47 +01:00
Erik Johnston
62126c996c
Propogate stale cache errors to calling functions
2015-08-07 19:17:58 +01:00
Erik Johnston
3213ff630c
Remove unnecessary cache
2015-08-07 19:14:05 +01:00
Erik Johnston
20addfa358
Change Cache to not use *args in its interface
2015-08-07 18:32:47 +01:00
Erik Johnston
9eb5b23d3a
Batch up various DB requests for event -> state
2015-08-07 18:16:02 +01:00
Erik Johnston
0211890134
Implement a CacheListDescriptor
2015-08-07 18:14:49 +01:00
Erik Johnston
ffdb8c3828
Don't be too enthusiatic with defer.gatherResults
2015-08-07 18:13:48 +01:00
Paul "LeoNerd" Evans
0db40d3e93
Don't complain about extra .pyc files we find while hunting for database schemas
2015-08-07 17:22:11 +01:00
Paul "LeoNerd" Evans
e3c8e2c13c
Add a --generate-keys option
2015-08-07 16:42:27 +01:00
Paul "LeoNerd" Evans
efe60d5e8c
Only print the pidfile path on startup if requested by a commandline flag
2015-08-07 16:36:42 +01:00
Erik Johnston
b2c7bd4b09
Cache get_recent_events_for_room
2015-08-07 14:42:34 +01:00
Erik Johnston
b3768ec10a
Remove unncessary cache
2015-08-07 13:41:05 +01:00
Erik Johnston
b8e386db59
Change Cache to not use *args in its interface
2015-08-07 11:52:21 +01:00
Erik Johnston
fe994e728f
Store absence of state in cache
2015-08-07 10:17:38 +01:00
Erik Johnston
1d08bf7c17
Merge branch 'erikj/cache_deferreds' into erikj/dictionary_cache
2015-08-06 14:03:15 +01:00
Erik Johnston
63b1eaf32c
Docs
2015-08-06 14:02:50 +01:00
Erik Johnston
b811c98574
Remove failed deferreds from cache
2015-08-06 14:01:27 +01:00
Erik Johnston
433314cc34
Re-implement DEBUG_CACHES flag
2015-08-06 14:01:05 +01:00
Erik Johnston
f596ff402e
Merge branch 'erikj/cache_deferreds' into erikj/dictionary_cache
2015-08-06 13:37:56 +01:00
Erik Johnston
2efb93af52
Merge branch 'erikj/cached_keyword_args' into erikj/cache_deferreds
2015-08-06 13:35:28 +01:00
Erik Johnston
953dbd28a7
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/cached_keyword_args
2015-08-06 13:35:03 +01:00
Erik Johnston
7eea3e356f
Make @cached cache deferreds rather than the deferreds' values
2015-08-06 13:33:34 +01:00
Erik Johnston
3e1b77efc2
Merge branch 'erikj/cached_keyword_args' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-05 16:45:56 +01:00
Erik Johnston
b52b4a84ec
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary_cache
2015-08-05 15:41:20 +01:00
Erik Johnston
1e62a3d3a9
Up the cache size for 'get_joined_hosts_for_room' and 'get_users_in_room'
2015-08-05 15:40:40 +01:00
Erik Johnston
a89559d797
Use LRU cache by default
2015-08-05 15:39:47 +01:00
Erik Johnston
07507643cb
Use dictionary cache to do group -> state fetching
2015-08-05 15:11:42 +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
Erik Johnston
c67ba143fa
Move DictionaryCache
2015-08-04 15:58:28 +01:00
Erik Johnston
e7768e77f5
Add basic dictionary cache
2015-08-04 15:56:56 +01:00
David Baker
883aabe423
splt long line
2015-08-04 15:20:35 +01:00
David Baker
e124128542
Bump schema version
2015-08-04 14:50:31 +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
Erik Johnston
2e35a733cc
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/acl_perf
2015-08-04 13:00:52 +01:00
Erik Johnston
413a4c289b
Add comment
2015-08-04 11:08:07 +01:00
Erik Johnston
4d6cb8814e
Speed up event filtering (for ACL) logic
2015-08-04 09:32:23 +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
David Baker
28d07a02e4
Add vector.im as trusted ID server
2015-08-03 15:31:21 +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
Erik Johnston
39e21ea51c
Add support for using keyword arguments with cached functions
2015-07-27 13:57:29 +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
Erik Johnston
459085184c
Factor out thumbnail()
2015-07-23 15:59:53 +01:00
Erik Johnston
2b4f47db9c
Generate local thumbnails on a thread
2015-07-23 14:52:29 +01:00
Erik Johnston
33d83f3615
Fix remote thumbnailing
2015-07-23 14:24:21 +01:00
Erik Johnston
ff7c2e41de
Always return a thumbnail of the requested size.
...
Before, we returned a thumbnail that was at least as big (if possible)
as the requested size. Now, if we don't have a thumbnail of the given
size we generate (and persist) one of that size.
2015-07-23 14:12:49 +01:00
Erik Johnston
103e1c2431
Pick larger than desired thumbnail for 'crop'
2015-07-23 11:12:49 +01:00
Matrix
4e2e67fd50
Disable receipts for now
2015-07-22 16:13:46 +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
David Baker
20c0324e9c
Dodesn't seem to make any difference: guess it does work with the object reference
2015-07-21 16:21:37 -07:00
David Baker
cf7a40b08a
I think this was what was intended...
2015-07-21 16:08:00 -07:00
Erik Johnston
90dbd71c13
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-07-21 09:25:30 +01:00
Mark Haines
3b5823c74d
s/take/claim/ for end to end key APIs
2015-07-20 18:23:54 +01:00
Daniel Wagner-Hall
53d1174aa9
Improve naming
2015-07-20 06:32:12 -07: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
Matrix
4f973eb657
Up default cache size for _RoomStreamChangeCache
2015-07-18 19:07:33 +01:00
Matrix
4cab2cfa34
Don't do any database hits in receipt handling if from_key == to_key
2015-07-18 19:07:12 +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
Erik Johnston
d155b318d2
Merge pull request #203 from matrix-org/erikj/room_creation_presets
...
Implement presets at room creation
2015-07-16 18:18:11 +01:00
Erik Johnston
a2ed7f437c
Merge pull request #202 from matrix-org/erikj/power_level_sanity
...
Change power level semantics.
2015-07-16 18:18:04 +01:00
Erik Johnston
c456d17daf
Implement specifying custom initial state for /createRoom
2015-07-16 15:25:29 +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
Matthew Hodgson
8cedf3ce95
bump up image quality a bit more as it looks crap
2015-07-14 23:53:13 +01:00
Erik Johnston
baa55fb69e
Merge pull request #193 from matrix-org/erikj/bulk_persist_event
...
Add bulk insert events API
2015-07-14 10:49:24 +01:00
Erik Johnston
002a44ac1a
s/everyone_ops/original_invitees_have_ops/
2015-07-14 10:37:42 +01:00
David Baker
62b4b72fe4
Close, but no cigar.
2015-07-14 10:33:25 +01:00
Erik Johnston
b49a30a972
Capitalize contants
2015-07-14 10:20:31 +01:00
Erik Johnston
4624d6035e
Docs
2015-07-14 10:19:07 +01:00
Erik Johnston
d5cc794598
Implement presets at room creation
2015-07-13 16:56:08 +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
016c089f13
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/power_level_sanity
2015-07-13 13:48:13 +01:00
Erik Johnston
e5991af629
Comments
2015-07-13 13:30:43 +01:00
Erik Johnston
17bb9a7eb9
Remove commented out code
2015-07-10 14:07:57 +01:00
Erik Johnston
a5ea22d468
Sanitize power level checks
2015-07-10 14:05:38 +01:00
Erik Johnston
7e3b14fe78
You shouldn't be able to ban/kick users with higher power levels
2015-07-10 14:05:38 +01:00
Erik Johnston
532fcc997a
Merge pull request #196 from matrix-org/erikj/room_history
...
Add ability to restrict room history.
2015-07-10 13:47:04 +01:00
Erik Johnston
0b3389bcd2
Merge pull request #194 from matrix-org/erikj/bulk_verify_sigs
...
Implement bulk verify_signed_json API
2015-07-10 13:46:53 +01:00
Erik Johnston
0d7f0febf4
Uniquely name unique constraint
2015-07-10 13:43:03 +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
Erik Johnston
9158ad1abb
Merge pull request #201 from EricssonResearch/msba/saml2-develop
...
Integrate SAML2 basic authentication - uses pysaml2
2015-07-10 10:25:56 +01:00
Erik Johnston
b5f0d73ea3
Add comment
2015-07-09 17:09:26 +01:00
Erik Johnston
ed88720952
Handle error slightly better
2015-07-09 16:14:46 +01:00
Erik Johnston
f0979afdb0
Remove spurious comment
2015-07-09 16:02:07 +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
c2d08ca62a
Integer timestamps
2015-07-09 13:15:34 +01:00
Erik Johnston
4019b48aaa
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts
2015-07-09 11:55:52 +01:00
Erik Johnston
294dbd712f
We don't want semicolons.
2015-07-09 11:47:24 +01:00
Erik Johnston
1af188209a
Change format of receipts to allow inclusion of data
2015-07-09 11:39:30 +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
Matthew Hodgson
fb8d2862c1
remove the tls_certificate_chain_path param and simply support tls_certificate_path pointing to a file containing a chain of certificates
2015-07-09 00:45:41 +01:00
Matthew Hodgson
8ad2d2d1cb
document tls_certificate_chain_path more clearly
2015-07-09 00:06:01 +01:00
Matthew Hodgson
f26a3df1bf
oops, context.tls_certificate_chain_file() expects a file, not a certificate.
2015-07-08 21:33:02 +01:00
Matthew Hodgson
19fa3731ae
typo
2015-07-08 18:53:41 +01:00
Matthew Hodgson
465acb0c6a
*cough*
2015-07-08 18:30:59 +01:00
Matthew Hodgson
64afbe6ccd
add new optional config for tls_certificate_chain_path for folks with intermediary SSL certs
2015-07-08 18:20:02 +01:00
Matthew Hodgson
04192ee05b
typo
2015-07-08 17:49:15 +01:00
Mark Haines
8fb79eeea4
Only remove one time keys when new one time keys are added
2015-07-08 17:04:29 +01:00
Erik Johnston
ce9e2f84ad
Add blist to dependencies
2015-07-08 15:41:59 +01:00
Erik Johnston
304343f4d7
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts
2015-07-08 15:37:33 +01:00
Erik Johnston
af812b68dd
Add a cache to fetching of receipt streams
2015-07-08 15:35:00 +01:00
Erik Johnston
d85ce8d89b
Split receipt events up into one per room
2015-07-08 11:36:05 +01:00
Muthu Subramanian
f53bae0c19
code beautify
2015-07-08 16:05:46 +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
87311d1b8c
Hook up receipts to v1 initialSync
2015-07-08 11:02:04 +01:00
Erik Johnston
ca041d5526
Wire together receipts and the notifer/federation
2015-07-07 15:25:30 +01:00
Erik Johnston
716e426933
Fix various typos
2015-07-07 10:55:31 +01:00
Erik Johnston
e8b2f6f8a1
Add a ReceiptServlet
2015-07-07 10:55:22 +01:00
Mark Haines
28ef344077
Merge branch 'mjark/missing_regex_group' into markjh/client-end-to-end-key-management
2015-07-06 18:48:27 +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
Mark Haines
b5770f8947
Add store for client end to end keys
2015-07-06 18:46:47 +01:00
Mark Haines
a7dcbfe430
Don't 500 if a group is missing from the regex
2015-07-06 16:47:17 +01:00
Erik Johnston
1a3255b507
Add m.room.history_visibility to newly created rooms' m.room.power_levels
2015-07-06 13:25:35 +01:00
Erik Johnston
fb47c3cfbe
Rename key and values for m.room.history_visibility. Support 'invited' value
2015-07-06 13:05:52 +01:00
Erik Johnston
65e69dec8b
Don't explode if we don't recognize one of the event_ids in the backfill request
2015-07-06 09:33:03 +01:00
Erik Johnston
c3e2600c67
Filter and redact events that the other server doesn't have permission to see during backfill
2015-07-03 17:52:57 +01:00
Erik Johnston
400894616d
Respect m.room.history_visibility in v2_alpha sync API
2015-07-03 14:51:01 +01:00
Erik Johnston
12b83f1a0d
If user supplies filename in URL when downloading from media repo, use that name in Content Disposition
2015-07-03 11:24:55 +01:00
Erik Johnston
00ab882ed6
Add m.room.history_visibility to list of auth events
2015-07-03 10:31:24 +01:00
Erik Johnston
41938afed8
Make v1 initial syncs respect room history ACL
2015-07-02 17:12:35 +01:00
Erik Johnston
1a60545626
Add basic impl for room history ACL on GET /messages client API
2015-07-02 16:20:10 +01:00
Erik Johnston
ac78e60de6
Add stream_id index
2015-07-02 13:18:41 +01:00
Erik Johnston
bd1236c0ee
Consolidate duplicate code in notifier
2015-07-02 11:46:05 +01:00
Erik Johnston
ddf7979531
Add receipts_key to StreamToken
2015-07-02 11:45:44 +01:00
Erik Johnston
0862fed2a8
Add basic ReceiptHandler
2015-07-01 17:19:31 +01:00
Erik Johnston
80a61330ee
Add basic storage functions for handling of receipts
2015-07-01 17:19:12 +01:00
Erik Johnston
480d720388
Bump changelog and version to v0.9.3
2015-07-01 15:12:32 +01:00
Erik Johnston
901f56fa63
Add tables for receipts
2015-06-30 15:29:47 +01:00
Erik Johnston
9beaedd164
Enforce ascii filenames for uploads
2015-06-30 10:31:59 +01:00
Erik Johnston
2124f668db
Add Content-Disposition headers to media repo v1 downloads
2015-06-30 09:35:44 +01:00
Erik Johnston
f0dd568e16
Wait for previous attempts at fetching keys for a given server before trying to fetch more
2015-06-26 11:25:00 +01:00
Erik Johnston
b5f55a1d85
Implement bulk verify_signed_json API
2015-06-26 10:39:34 +01:00
Erik Johnston
5130d80d79
Add bulk insert events API
2015-06-25 17:29:34 +01:00
David Baker
6825eef955
Oops: underride rule had an identifier with override in it.
2015-06-23 14:26:14 +01:00
Erik Johnston
6924852592
Batch SELECTs in _get_auth_chain_ids_txn
2015-06-23 11:01:04 +01:00
Erik Johnston
9c72011fd7
Bumb version
2015-06-23 10:12:19 +01:00
Erik Johnston
2f556e0c55
Fix typo
2015-06-19 16:22:53 +01:00
Erik Johnston
7fa1363fb0
Merge pull request #192 from matrix-org/erikj/fix_log_context
...
Fix log context when sending requests
2015-06-19 16:21:40 +01:00
Erik Johnston
275dab6b55
Merge pull request #190 from matrix-org/erikj/syn-412
...
Fix notifier leak
2015-06-19 11:49:58 +01:00
Erik Johnston
a68abc79fd
Add comment on cancellation of observers
2015-06-19 11:48:55 +01:00
Erik Johnston
653533a3da
Fix log context when sending requests
2015-06-19 11:46:49 +01:00
Erik Johnston
9bf61ef97b
Merge pull request #189 from matrix-org/erikj/room_init_sync
...
Improve room init sync speed.
2015-06-19 11:36:06 +01:00
Erik Johnston
0e58d19163
Merge pull request #187 from matrix-org/erikj/sanitize_logging
...
Sanitize logging
2015-06-19 11:35:59 +01:00
Erik Johnston
18968efa0a
Remove stale debug lines
2015-06-19 10:18:02 +01:00
Erik Johnston
eb928c9f52
Add site_tag to logger
2015-06-19 10:16:48 +01:00
Erik Johnston
9d112f4440
Add IDs to outbound transactions
2015-06-19 10:13:03 +01:00
Eric Myhre
9e5a353663
Make upload dir a configurable path.
...
Fixes SYN-425.
Signed-off-by: Eric Myhre <hash@exultant.us>
2015-06-18 23:38:20 -05:00
Erik Johnston
6f6ebd216d
PEP8
2015-06-18 17:00:32 +01:00
Erik Johnston
73513ececc
Documentation
2015-06-18 16:15:10 +01:00
Erik Johnston
1f24c2e589
Don't bother proxying lookups on _NotificationListener to underlying deferred
2015-06-18 16:09:53 +01:00
Erik Johnston
22049ea700
Refactor the notifier.wait_for_events code to be clearer. Add _NotifierUserStream.new_listener that accpets a token to avoid races.
2015-06-18 15:49:24 +01:00
Erik Johnston
050ebccf30
Fix notifier leak
2015-06-18 11:36:26 +01:00
Kegan Dougal
d88e20cdb9
Fix bug where synapse was sending AS user queries incorrectly.
...
Bug introduced in 92b20713d7
which reversed the comparison when checking if a user existed
in the users table. Added UTs to prevent this happening again.
2015-06-17 17:26:03 +01:00
Erik Johnston
eceb554a2f
Use another deferred list
2015-06-16 17:12:27 +01:00
Erik Johnston
b849a64f8d
Use DeferredList
2015-06-16 17:03:24 +01:00
Erik Johnston
0460406298
Don't do unecessary db ops in presence.get_state
2015-06-16 16:59:38 +01:00
Paul "LeoNerd" Evans
9a3cd1c00d
Correct -H SERVER_NAME in config-missing complaint message
2015-06-16 16:03:35 +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
f13890ddce
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/sanitize_logging
2015-06-15 18:26:24 +01:00
Erik Johnston
aaa749d366
Disable twisted access logging. Move access logging to SynapseRequest object
2015-06-15 18:18:05 +01:00
Erik Johnston
bc42ca121f
Merge pull request #185 from matrix-org/erikj/listeners_config
...
Change listener config.
2015-06-15 18:05:58 +01:00
Erik Johnston
cee69441d3
Log more when we have processed the request
2015-06-15 17:11:44 +01:00
Erik Johnston
b5209c5744
Create SynapseRequest that overrides __repr__ to not print access_token
2015-06-15 16:37:04 +01:00
Erik Johnston
44c9102e7a
Merge branch 'erikj/listeners_config' into erikj/sanitize_logging
2015-06-15 14:45:52 +01:00
Erik Johnston
7f7ec84d6f
Bump version
2015-06-15 14:16:29 +01:00
Erik Johnston
f00f8346f1
Make http.server request logging more verbose, but redact access_tokens
2015-06-15 13:37:58 +01:00
Erik Johnston
83f119a84a
Log requests and responses sent via http.client
2015-06-15 13:14:12 +01:00
Erik Johnston
9d0326baa6
Remove redundant newline
2015-06-15 11:27:29 +01:00
Erik Johnston
186f61a3ac
Document listener config. Remove deprecated config options
2015-06-15 11:25:53 +01:00
Erik Johnston
6c01ceb8d0
Bump version
2015-06-13 12:22:14 +01:00
Erik Johnston
2eda996a63
Add a dummy.sql into delta/20 as pip isn't packinging the pushers.py
2015-06-13 12:21:58 +01:00
Erik Johnston
a005b7269a
Add backwards compat support for metrics, manhole and webclient config options
2015-06-12 17:44:23 +01:00
Erik Johnston
942e39e87c
PEP8
2015-06-12 17:13:54 +01:00
Erik Johnston
9c5fc81c2d
Correctly handle x_forwaded listener option
2015-06-12 17:13:23 +01:00
Erik Johnston
fd2c07bfed
Use config.listeners
2015-06-12 15:33:07 +01:00
Erik Johnston
c42ed47660
Fix up create_resource_tree
2015-06-12 11:52:52 +01:00
Erik Johnston
1e365e88bd
Bump schema version
2015-06-11 15:50:39 +01:00
Erik Johnston
2d41dc0069
Bump version
2015-06-11 15:49:19 +01:00
Erik Johnston
f7f07dc517
Begin changing the config format
2015-06-11 15:48:52 +01:00
David Baker
b8690dd840
Catch any exceptions in the pusher loop. Use a lower timeout for pushers so we can see if they're actually still running.
2015-06-05 11:40:22 +01:00
David Baker
da84946de4
pep8
2015-06-04 16:43:45 +01:00
David Baker
63a7b3ad1e
Add script to (re)convert the pushers table to changing the unique key. Also give the python db upgrade scripts the database engine so they can convert parameter strings, and add *args **kwargs to the upgrade function so we can add more args in future and previous scripts will ignore them.
2015-06-04 16:16:01 +01:00
Erik Johnston
5730b20c6d
Merge pull request #175 from matrix-org/erikj/thumbnail_thread
...
Thumbnail images on a seperate thread
2015-06-03 17:26:56 +01:00
Erik Johnston
8047fd2434
Merge pull request #176 from matrix-org/erikj/backfill_auth
...
Improve backfill.
2015-06-03 17:25:37 +01:00
Erik Johnston
3bbd0d0e09
Merge pull request #180 from matrix-org/erikj/prev_state_context
...
Don't needlessly compute prev_state
2015-06-03 17:20:56 +01:00
Erik Johnston
9dda396baa
Merge pull request #179 from matrix-org/erikj/state_group_outliers
...
Don't compute EventContext for outliers.
2015-06-03 17:20:40 +01:00
Erik Johnston
13ed3b9985
Merge pull request #178 from matrix-org/erikj/cache_state_groups
...
Add cache to get_state_groups.
2015-06-03 17:20:33 +01:00
Erik Johnston
bd2cf9d4bf
Merge pull request #177 from matrix-org/erikj/content_repo_http_client
...
SYN-403: Make content repository use its own http client.
2015-06-03 17:20:27 +01:00
Erik Johnston
d4902a7ad0
Merge pull request #174 from matrix-org/erikj/compress_option
...
Add config option to disable compression of http responses
2015-06-03 17:18:17 +01:00
Erik Johnston
55bf90b9e4
Don't needlessly compute prev_state
2015-06-03 16:44:24 +01:00
Erik Johnston
53f0bf85d7
Comment
2015-06-03 16:43:40 +01:00
Erik Johnston
1c3d844e73
Don't needlessly compute context
2015-06-03 16:41:51 +01:00
Erik Johnston
0d7d9c37b6
Add cache to get_state_groups
2015-06-03 14:45:55 +01:00
Erik Johnston
d8866d7277
Caches should be bound to instances.
...
Before, caches were global and so different instances of the stores
would share caches. This caused problems in the unit tests.
2015-06-03 14:45:17 +01:00
Erik Johnston
2ef2f6d593
SYN-403: Make content repository use its own http client.
2015-06-03 10:17:37 +01:00
Erik Johnston
3483b78d1a
Log where a request came from in federation
2015-06-02 18:15:13 +01:00
Erik Johnston
d3ded420b1
Rephrase log line
2015-06-02 16:30:52 +01:00
Erik Johnston
22716774d5
Don't about JSON when warning about content tampering
2015-06-02 16:30:52 +01:00
Erik Johnston
5044e6c544
Thumbnail images on a seperate thread
2015-06-02 15:39:08 +01:00
Erik Johnston
09e23334de
Add a timeout
2015-06-02 11:00:37 +01:00
Erik Johnston
02410e9239
Handle the fact we might be missing auth events
2015-06-02 10:58:35 +01:00
Erik Johnston
e552b78d50
Add some logging
2015-06-02 10:28:14 +01:00
Erik Johnston
fde0da6f19
Correctly look up auth_events
2015-06-02 10:19:38 +01:00
Erik Johnston
3f04a08a0c
Don't process events we've already processed. Remember to process state events
2015-06-02 10:11:32 +01:00
Erik Johnston
4bbfbf898e
Correctly pass in auth_events
2015-06-01 17:02:23 +01:00
Erik Johnston
6e17463228
Don't explode if we don't have the event
2015-06-01 16:39:43 +01:00
Erik Johnston
522f285f9b
Add config option to disable compression of http responses
2015-06-01 13:36:30 +01:00
Mark Haines
b8d49be5a1
Merge branch 'develop' into markjh/twisted-15
...
Conflicts:
synapse/python_dependencies.py
2015-06-01 10:56:05 +01:00
Mark Haines
90abdaf3bc
Use Twisted-15.2.1, Use Agent.usingEndpointFactory rather than implement our own Agent
2015-06-01 10:51:50 +01:00
Mark Haines
d70c847b4f
Merge pull request #170 from matrix-org/markjh/SYT-8-recaptcha
...
Allow endpoint for verifying recaptcha to be configured
2015-05-29 15:32:54 +01:00
Erik Johnston
d15f166093
Remove log line
2015-05-29 15:03:24 +01:00
Erik Johnston
ca580ef862
Don't copy twice
2015-05-29 15:02:55 +01:00
Mark Haines
784aaa53df
Merge branch 'develop' into markjh/SYT-8-recaptcha
...
Conflicts:
synapse/handlers/auth.py
2015-05-29 13:49:44 +01:00
Erik Johnston
8355b4d074
Bump syutil version
2015-05-29 13:08: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
Mark Haines
d94590ed48
Add config for setting the recaptcha verify api endpoint, so we can test it in sytest
2015-05-29 12:11:40 +01:00
Erik Johnston
afbd3b2fc4
SYN-395: Fix CAPTCHA, don't double decode json
2015-05-28 18:05:00 +01:00
Erik Johnston
79e37a7ecb
Correctly pass connection pool parameter
2015-05-28 16:48:53 +01:00
Erik Johnston
0f118e55db
Merge pull request #168 from matrix-org/erikj/conn_pool
...
Make HTTP clients use connection pools.
2015-05-28 16:03:56 +01:00
Erik Johnston
dd74436ffd
Unused import
2015-05-28 15:47:20 +01:00
Erik Johnston
11f51e6ded
Up maxPersistentPerHost count
2015-05-28 15:45:46 +01:00
Erik Johnston
086df80790
Add connection pooling to SimpleHttpClient
2015-05-28 15:43:21 +01:00
Erik Johnston
291e942332
Use connection pool for federation connections
2015-05-28 15:43:21 +01:00
Erik Johnston
31ade3b3e9
Remove a deep copy
2015-05-28 13:45:23 +01:00
Erik Johnston
36b3b75b21
Registration should be disabled by default
2015-05-28 11:01:34 +01:00
Mark Haines
554c63ca60
Iterate over the user_streams not the user_ids
2015-05-26 15:03:49 +01:00
Mark Haines
fff7905409
Merge branch 'bugs/SYN-390' into release-v0.9.1
2015-05-26 14:58:49 +01:00
Mark Haines
00dd207f60
Take a dict of the rule, not the rule list
2015-05-26 14:57:48 +01:00
Erik Johnston
2651fd5e24
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.9.1
2015-05-26 11:05:50 +01:00
Mark Haines
e7b25a649c
Merge pull request #166 from matrix-org/bugs/SYN-390
...
SYN-390: Don't modify the dictionary returned from the database here either
2015-05-26 10:40:50 +01:00
Mark Haines
804b732aab
SYN-390: Don't modify the dictionary returned from the database here either
2015-05-26 10:35:08 +01:00
Erik Johnston
45fffe8cbe
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.9.1
2015-05-26 10:22:41 +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
Erik Johnston
27e093cbc1
Bump version
2015-05-22 17:03:37 +01:00
Mark Haines
d9f60e8dc8
Merge pull request #163 from matrix-org/markjh/presence_list_cache
...
Add a cache for the presence list
2015-05-22 17:02:23 +01:00
Mark Haines
0e42dfbe22
Merge pull request #164 from matrix-org/markjh/pusher_performance_2
...
Add a cache for get_push rules for user, fix cache invalidation
2015-05-22 17:01:56 +01:00
Erik Johnston
6eadbfbea0
Remove redundant for loop
2015-05-22 16:12:20 +01:00
Mark Haines
1a9a9abcc7
Add a cache for getting the presence list for a user
2015-05-22 16:11:17 +01:00
Erik Johnston
74b7de83ec
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/backfill_fixes
2015-05-22 16:10:42 +01:00
Mark Haines
36317f3dad
Merge pull request #156 from matrix-org/erikj/join_perf
...
Make joining #matrix:matrix.org over federation quicker
2015-05-22 16:09:54 +01:00
Mark Haines
052ac0c8d0
Merge pull request #159 from matrix-org/erikj/metrics_interface_config
...
Enable changing the interface the metrics listener binds to
2015-05-22 16:09:33 +01:00
Mark Haines
49a2c10279
Merge pull request #157 from matrix-org/markjh/presence_performance
...
Improve presence performance in loadtest
2015-05-22 16:04:40 +01:00
Mark Haines
5d53c14342
Merge pull request #160 from matrix-org/markjh/appservice_performance
...
Make the appservice use 'users_in_room' rather than get_room_members …
2015-05-22 16:04:22 +01:00
Mark Haines
106a3051b8
Remove spurious TODO comment
2015-05-22 15:53:03 +01:00
Erik Johnston
284f55a7fb
Add doc strings
2015-05-22 15:18:04 +01:00
Erik Johnston
1ce1509989
s/metric_interface/metric_bind_host/
2015-05-22 14:51:22 +01:00
Erik Johnston
8bb85c8c5a
Update log line
2015-05-22 14:48:06 +01:00
Mark Haines
c8135f808b
Remove unused import
2015-05-22 14:45:46 +01:00
Erik Johnston
b21d015c55
Log origin and stats of incoming transactions
2015-05-22 14:44:25 +01:00
Erik Johnston
e70e8e053e
Add txn_id to some log lines
2015-05-22 14:44:02 +01:00
Erik Johnston
1b446a5d85
Log less lines at INFO level, but include more helpful information
2015-05-22 14:29:57 +01:00
Erik Johnston
59a0682f3e
Enable changing the interface the metrics listener binds to
2015-05-22 13:13:07 +01:00
Mark Haines
b6adfc59f5
Invalidate the get_latest_event_ids_in_room cache when deleting from event_forward_extremities
2015-05-22 13:01:03 +01:00
Mark Haines
f43544eecc
Make the appservice use 'users_in_room' rather than get_room_members since it is cached
2015-05-22 11:01:28 +01:00
Mark Haines
a04cde613e
Add a cache for get_push rules for user, fix cache invalidation
2015-05-22 10:39:45 +01:00
Erik Johnston
4429e720ae
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-05-22 10:33:00 +01:00
Erik Johnston
f8c2cd129d
Bump version
2015-05-21 17:03:30 +01:00
Mark Haines
2043527b9b
Don't try to use a txn when not in one, remove spurious debug logging
2015-05-21 16:53:03 +01:00
Mark Haines
53447e9cd3
Add caches for things requested by the pushers
2015-05-21 16:41:39 +01:00
Mark Haines
d61ce3f670
Add a cache for get_current_state with state_key
2015-05-21 16:41:39 +01:00
Erik Johnston
a910984b58
Actually return something from lambda
2015-05-21 15:58:41 +01:00
Erik Johnston
e309b1045d
Sort backfill events
2015-05-21 15:57:35 +01:00
Erik Johnston
0180bfe4aa
Remove dead code
2015-05-21 15:53:41 +01:00
Erik Johnston
1f3d1d85a9
Only get non-state
2015-05-21 15:52:29 +01:00
Erik Johnston
39a3340f73
Skip events we've already seen
2015-05-21 15:48:56 +01:00
Erik Johnston
ae3bff3491
Correctly prepopulate queue
2015-05-21 15:46:07 +01:00
Erik Johnston
dc085ddf8c
Don't prepopulate event_results
2015-05-21 15:44:05 +01:00
Erik Johnston
73d23c6ae8
Don't readd things that are already in event_results
2015-05-21 15:40:22 +01:00
Erik Johnston
6189d8e54d
PriorityQueue gives lowest first
2015-05-21 15:38:08 +01:00
Erik Johnston
115ef3ddac
Correctly capture Queue.Empty exception
2015-05-21 15:37:43 +01:00
Erik Johnston
4fb858d90a
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/backfill_fixes
2015-05-21 15:25:54 +01:00
Mark Haines
88f1ea36ce
Oops, get_rooms_for_user returns a namedtuple, not a room_id
2015-05-21 15:23:58 +01:00
Erik Johnston
c2633907c5
Merge branch 'erikj/join_perf' of github.com:matrix-org/synapse into erikj/backfill_fixes
2015-05-21 14:58:47 +01:00
Erik Johnston
ebfdd2eb5b
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/join_perf
2015-05-21 14:54:52 +01:00
Erik Johnston
a551c5dad7
Merge pull request #155 from matrix-org/erikj/perf
...
Bulk and batch retrieval of events.
2015-05-21 14:54:40 +01:00
Erik Johnston
27e4b45c06
s/for events/for requests for events/
2015-05-21 14:52:23 +01:00
Erik Johnston
ac5f2bf9db
s/for events/for requests for events/
2015-05-21 14:50:57 +01:00
Erik Johnston
80a167b1f0
Add comments
2015-05-21 11:19:04 +01:00
Mark Haines
7ae8afb7ef
Removed unused 'is_visible' method
2015-05-20 14:48:11 +01:00
Erik Johnston
9118a92862
Split up _get_events into defer and txn versions
2015-05-20 13:27:16 +01:00
Mark Haines
e01b825cc9
Clean up the presence_list checking logic a bit
2015-05-20 13:21:59 +01:00
Erik Johnston
ab45e12d31
Make not return a deferred _get_event_from_row_txn
2015-05-20 13:07:19 +01:00
Erik Johnston
f407cbd2f1
PEP8
2015-05-20 13:02:01 +01:00
Erik Johnston
227f8ef031
Split out _get_event_from_row back into defer and _txn version
2015-05-20 13:00:57 +01:00
Erik Johnston
2bc60c55af
Fix _get_backfill_events to return events in the correct order
2015-05-20 12:57:00 +01:00
Erik Johnston
20814fabdd
Actually fetch state for new backwards extremeties when backfilling.
2015-05-20 11:59:02 +01:00
Erik Johnston
9084cdd70f
Ensure event_results is a set
2015-05-19 16:34:31 +01:00
Erik Johnston
3a653515ec
Add None check
2015-05-19 15:27:09 +01:00
Erik Johnston
aa729349dd
Fix event_backwards_extrem insertion to ignore outliers
2015-05-19 15:27:00 +01:00
Erik Johnston
5b1631a4a9
Add a timeout param to get_event
2015-05-19 14:53:32 +01:00
Erik Johnston
291cba284b
Handle the case when things return empty but non none things
2015-05-19 14:42:46 +01:00
Erik Johnston
253f76a0a5
Don't always hit get_server_verify_key_v1_direct
2015-05-19 14:42:38 +01:00
Erik Johnston
6837c5edab
Handle the case when things return empty but non none things
2015-05-19 14:27:11 +01:00
Erik Johnston
7223129916
Don't apply new room join hack if depth > 5
2015-05-19 14:16:08 +01:00
Erik Johnston
5ae4a84211
Don't always hit get_server_verify_key_v1_direct
2015-05-19 13:43:34 +01:00
Erik Johnston
118a760719
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/join_perf
2015-05-19 13:20:29 +01:00
David Baker
19505e0392
Disable GZip encoding on static file resources as per comment
2015-05-19 13:20:25 +01:00
Erik Johnston
d3e09f12d0
SYN-383: Actually, we expect this value to be a dict
2015-05-19 13:12:41 +01:00
Erik Johnston
677be13ffc
Revert accidental commit
2015-05-19 13:12:28 +01:00
Erik Johnston
350b88656a
SYN-383: Actually, we expect this value to be a dict
2015-05-19 13:01:57 +01:00
Erik Johnston
9de94d5a4d
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/join_perf
2015-05-19 12:50:17 +01:00
Erik Johnston
2b7120e233
SYN-383: Handle the fact the server might not have signed things
2015-05-19 12:49:38 +01:00
Erik Johnston
8b256a7296
Don't reuse var names
2015-05-19 11:58:22 +01:00
Erik Johnston
62ccc6d95f
Don't reuse var names
2015-05-19 11:58:04 +01:00
Erik Johnston
01858bcbf2
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/join_perf
2015-05-19 11:56:35 +01:00
Erik Johnston
2aeee2a905
SYN-383: Fix parsing of verify_keys and catching of _DefGen_Return
2015-05-19 11:56:18 +01:00
Erik Johnston
5e7883ec19
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/join_perf
2015-05-19 10:50:43 +01:00
Mark Haines
c6a03c46e6
SYN-383: Extract the response list from 'server_keys' in the response JSON as it might work better than iterating over the top level dict
2015-05-19 10:23:02 +01:00
Mark Haines
e4c65b338d
Speed up the get_pagination_rows as well
2015-05-18 18:21:06 +01:00
Mark Haines
99914ec9f8
Merge pull request #152 from matrix-org/notifier_performance
...
Notifier performance
2015-05-18 17:49:59 +01:00
Erik Johnston
ef910a0358
Do work in parellel when joining a room
2015-05-18 17:17:04 +01:00
Mark Haines
591c4bf223
Cache the most recent serial for each room
2015-05-18 16:21:51 +01:00
Mark Haines
e1150cac4b
Move updating the serial and state of the presence cache into a single function
2015-05-18 15:46:37 +01:00
Erik Johnston
165eb2dbe6
Comments and shuffle of functions
2015-05-18 15:18:41 +01:00
Mark Haines
880fb46de0
Merge branch 'notifier_performance' into markjh/presence_performance
2015-05-18 14:33:58 +01:00
Erik Johnston
65878a2319
Remove unused metric
2015-05-18 14:06:30 +01:00
Mark Haines
ad31fa3040
Don't bother sorting by the room_stream_ids, it shouldn't matter which order they are notified in
2015-05-18 14:04:58 +01:00
Erik Johnston
4d1b6f4ad1
Remove rejected events if we don't want rejected events
2015-05-18 14:03:46 +01:00
Mark Haines
0b0033c40b
Merge branch 'develop' into notifier_performance
2015-05-18 13:50:01 +01:00
Mark Haines
755def8083
Add more doc string, reduce C+P boilerplate for getting room list
2015-05-18 13:46:47 +01:00
Mark Haines
1e90715a3d
Make sure the notifier stream token goes forward when it is updated. Sort the pending events by the correct room_stream_id
2015-05-18 13:17:36 +01:00
Erik Johnston
131bdf9bb1
Merge branch 'erikj/events_move' of github.com:matrix-org/synapse into erikj/perf
2015-05-18 10:23:37 +01:00
Erik Johnston
10f1bdb9a2
Move get_events functions to storage.events
2015-05-18 10:21:40 +01:00
Erik Johnston
d5cea26d45
Remove pointless newline
2015-05-18 10:16:45 +01:00
Erik Johnston
c71176858b
Newline, remove debug logging
2015-05-18 10:11:14 +01:00
Erik Johnston
f8bd4de87d
Remove debug logging
2015-05-18 09:58:03 +01:00
Erik Johnston
c3b37abdfd
PEP8
2015-05-15 16:59:58 +01:00
Erik Johnston
6c74fd62a0
Revert limiting of fetching, it didn't help perf.
2015-05-15 16:45:35 +01:00
Erik Johnston
9ff7f66a2b
init j
2015-05-15 16:36:03 +01:00
Erik Johnston
70f272f71c
Don't completely drain the list
2015-05-15 16:34:17 +01:00
Erik Johnston
8763dd80ef
Don't fetch prev_content for current_state
2015-05-15 15:33:01 +01:00
Erik Johnston
807229f2f2
Err, defer.gatherResults ftw
2015-05-15 15:20:29 +01:00
Erik Johnston
acb12cc811
Make store.get_current_state fetch events asyncly
2015-05-15 15:20:05 +01:00
Erik Johnston
d62dee7eae
Remove more debug logging
2015-05-15 15:06:37 +01:00
Erik Johnston
0f29cfabc3
Remove debug logging
2015-05-15 14:06:42 +01:00
Erik Johnston
e275a9c0d9
preserve log context
2015-05-15 11:54:51 +01:00
Erik Johnston
aa32bd38e4
Add a wait
2015-05-15 11:35:04 +01:00
Erik Johnston
372d4c6d7b
Srsly. Don't use closures. Baaaaaad
2015-05-15 11:26:00 +01:00
Erik Johnston
575ec91d82
Correctly pass through params
2015-05-15 11:15:10 +01:00
Mark Haines
10be983f2c
Merge pull request #153 from matrix-org/markjh/presence_docstring
...
Add some doc strings for presence.
2015-05-15 11:11:47 +01:00
Mark Haines
415b158ce2
More whitespace
2015-05-15 11:09:47 +01:00
Erik Johnston
de01438a57
Sort out error handling
2015-05-15 11:00:50 +01:00
Erik Johnston
a2c4f3f150
Fix daedlock
2015-05-15 10:54:04 +01:00
Mark Haines
0a4330cd5d
Add some missed argument types, cleanup the whitespace a bit
2015-05-14 17:48:12 +01:00
Mark Haines
47ec693e29
More doc-strings
2015-05-14 17:07:02 +01:00
Erik Johnston
1d566edb81
Remove race condition
2015-05-14 16:54:35 +01:00
David Baker
6e1ad283cf
Support gzip encoding for client, client v2 and web client resources (SYN-176).
2015-05-14 16:39:19 +01:00
Erik Johnston
ef3d8754f5
Call from right thread
2015-05-14 15:41:55 +01:00
Erik Johnston
142934084a
Count and loop
2015-05-14 15:40:21 +01:00
Erik Johnston
96c5b9f87c
Don't start up more fetch_events
2015-05-14 15:36:04 +01:00
Erik Johnston
7cd6a6f6cf
Awful idea for speeding up fetching of events
2015-05-14 15:34:02 +01:00
Mark Haines
c5d1b4986b
Remove unused arguments and doc PresenceHandler.push_update_to_clients
2015-05-14 14:59:31 +01:00
Erik Johnston
7f4105a5c9
Turn off preemptive transactions
2015-05-14 14:51:06 +01:00
Erik Johnston
f4d58deba1
PEP8
2015-05-14 14:45:42 +01:00
Erik Johnston
386b7330d2
Move from _base to events
2015-05-14 14:45:22 +01:00
Mark Haines
0ad1c67234
Add some doc-strings to notifier
2015-05-14 14:35:07 +01:00
Erik Johnston
7d6a1dae31
Jump out early
2015-05-14 14:27:58 +01:00
Erik Johnston
656223fbd3
Actually, we probably want to run this in a transaction
2015-05-14 14:26:35 +01:00
David Baker
67800f7626
Treat setting your display name to the empty string as removing it (SYN-186).
2015-05-14 14:19:59 +01:00
Erik Johnston
2f7f8e1c2b
Preemptively jump into a transaction if we ask for get_prev_content
2015-05-14 14:17:36 +01:00
Mark Haines
4770cec7bc
Merge pull request #150 from matrix-org/notifier_unify
...
Make v1 and v2 client APIs interact with the notifier in the same way.
2015-05-14 14:16:59 +01:00
Erik Johnston
e1e9f0c5b2
loop -> gatherResults
2015-05-14 13:58:49 +01:00
Erik Johnston
ab78a8926e
Err, we probably want a bigger limit
2015-05-14 13:47:16 +01:00
Erik Johnston
f6f902d459
Move fetching of events into their own transactions
2015-05-14 13:45:48 +01:00
Erik Johnston
cdb3757942
Refactor _get_events
2015-05-14 13:31:55 +01:00
David Baker
92e1c8983d
Disallow whitespace in aliases here too
2015-05-14 13:21:55 +01:00
David Baker
0c894e1ebd
Throw error when creating room if alias contains whitespace #SYN-335
2015-05-14 13:11:28 +01:00
Mark Haines
084c365c3a
Use the current token when timing out a notifier, make sure the user_id is a string in on_new_user_event
2015-05-14 12:03:26 +01:00
David Baker
c37a6e151f
Make shared secret registration work again
2015-05-14 12:03:13 +01:00
Erik Johnston
36ea26c5c0
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/perf
2015-05-14 12:01:38 +01:00
David Baker
7c549dd557
Add ID generator for push_rules_enable to #resolve SYN-378
2015-05-14 11:44:03 +01:00
Mark Haines
899d4675dd
Merge branch 'notifier_unify' into notifier_performance
2015-05-14 11:36:44 +01:00
Mark Haines
243c56e725
Merge branch 'develop' into notifier_unify
2015-05-14 11:36:23 +01:00
Mark Haines
3edd2d5c93
Fix v2 sync, update the last_notified_ms only if there was an active listener
2015-05-14 11:25:30 +01:00
Erik Johnston
4f1d984e56
Add index on events
2015-05-13 17:22:26 +01:00
Mark Haines
5e0c533672
Fix metric counter
2015-05-13 17:20:28 +01:00
Erik Johnston
968b01a91a
Actually use async method
2015-05-13 17:02:46 +01:00
Erik Johnston
4071f29653
Fetch events from events_id in their own transactions
2015-05-13 16:59:41 +01:00
Mark Haines
f1b83d88a3
Discard unused NotifierUserStreams
2015-05-13 16:54:02 +01:00
Erik Johnston
a988361aea
Typo
2015-05-13 15:44:15 +01:00
Erik Johnston
8888982db3
Don't insert None
2015-05-13 15:43:32 +01:00
Mark Haines
9af432257d
Don't set a timer if there's already a result to return
2015-05-13 15:42:13 +01:00
Erik Johnston
cf706cc6ef
Don't return None
2015-05-13 15:31:25 +01:00
Erik Johnston
5971d240d4
Limit batch size
2015-05-13 15:26:49 +01:00
Erik Johnston
ca4f458787
Fetch events in bulk
2015-05-13 15:13:42 +01:00
Mark Haines
df6db5c802
Don't bother checking for new events from a source if the stream token hasn't advanced for that source
2015-05-13 15:08:24 +01:00
Erik Johnston
6edff11a88
Don't fetch redaction and rejection stuff for each event, so we can use index only scan
2015-05-13 14:39:05 +01:00
Mark Haines
63878c0379
Don't bother checking for updates if the stream token hasn't advanced for a user
2015-05-13 13:42:21 +01:00
Erik Johnston
02590c3e1d
Temp turn off checking for rejections and redactions
2015-05-13 11:31:28 +01:00
Erik Johnston
619a21812b
defer.gatherResults loop
2015-05-13 11:29:03 +01:00
Erik Johnston
fec4485e28
Batch fetching of events for state groups
2015-05-13 11:22:42 +01:00
Erik Johnston
409bcc76bd
Load events for state group seperately
2015-05-13 11:13:31 +01:00
Mark Haines
cffe6057fb
Merge branch 'notifier_unify' into notifier_performance
...
Conflicts:
synapse/notifier.py
2015-05-12 16:37:50 +01:00
Erik Johnston
80fd2b574c
Don't talk to yourself when backfilling
2015-05-12 16:19:46 +01:00
Erik Johnston
e122685978
You need to call contextmanager
2015-05-12 16:12:37 +01:00
Mark Haines
d7b3ac46f8
Revert "Improvement to performance of presence event stream handling"
2015-05-12 15:44:21 +01:00
Mark Haines
4429e4bf24
Merge branch 'develop' into notifier_unify
...
Conflicts:
synapse/notifier.py
2015-05-12 15:31:26 +01:00
Mark Haines
ec07dba29e
Merge pull request #143 from matrix-org/erikj/SYN-375
...
SYN-375 - Lots of unhandled deferred exceptions.
2015-05-12 15:25:54 +01:00
Mark Haines
c167cbc9fd
Merge pull request #147 from matrix-org/presence-performance
...
Improvement to performance of presence event stream handling
2015-05-12 15:24:54 +01:00
Mark Haines
a6fb2aa2a5
Merge pull request #144 from matrix-org/erikj/logging_context
...
Preserving logging contexts
2015-05-12 15:23:50 +01:00
Mark Haines
1fce36b111
Merge pull request #149 from matrix-org/erikj/backfill
...
Backfill support
2015-05-12 15:20:32 +01:00
Erik Johnston
8b28209c60
Err, delete the right stuff
2015-05-12 15:02:53 +01:00
Erik Johnston
30c72d377e
Newlines
2015-05-12 14:47:40 +01:00
Erik Johnston
e4eddf9b36
We do actually want to delete rows out of event_backward_extremities
2015-05-12 14:47:23 +01:00
Erik Johnston
c1779a79bc
Fix up _handle_prev_events to not try to insert duplicate rows
2015-05-12 14:41:50 +01:00
Erik Johnston
74850d7f75
Do state groups persistence /after/ checking if we have already persisted the event
2015-05-12 14:14:58 +01:00
Erik Johnston
07a1223156
s/backfil/backfill/
2015-05-12 14:09:54 +01:00
Erik Johnston
0d31ad5101
Typos everywhere
2015-05-12 14:02:01 +01:00
Erik Johnston
a0dfffb33c
And another typo.
2015-05-12 14:00:31 +01:00
Erik Johnston
6e5ac4a28f
Err, gatherResults doesn't take a dict...
2015-05-12 13:58:14 +01:00
Erik Johnston
8022b27fc2
Make distributer.fire work as it did
2015-05-12 13:14:48 +01:00
Erik Johnston
95dedb866f
Unwrap defer.gatherResults failures
2015-05-12 13:14:29 +01:00
Mark Haines
78672a9fd5
Merge branch 'notifier_unify' into notifier_performance
2015-05-12 13:11:54 +01:00
Erik Johnston
da6a7bbdde
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/logging_context
2015-05-12 13:10:42 +01:00
Mark Haines
2551b6645d
Update the end_token correctly, otherwise the token doesn't advance and the client gets duplicate events
2015-05-12 11:54:18 +01:00
Mark Haines
5e4ba463b7
Merge branch 'develop' into notifier_unify
2015-05-12 11:41:53 +01:00
Mark Haines
5002056b16
SYN-377: Make sure that the StreamIdGenerator.get_next.__exit__ is called from the main thread after the transaction completes, not from database thread before the transaction completes.
2015-05-12 11:20:40 +01:00
Mark Haines
5c75adff95
Add a NotifierUserStream to hold all the notification listeners for a user
2015-05-12 11:00:37 +01:00
Erik Johnston
367382b575
Handle the case where the other side is unreachable when backfilling
2015-05-12 10:35:45 +01:00
Erik Johnston
4df11b5039
Make get_current_token accept a direction parameter, which tells whether the source whether we want a token for going 'forwards' or 'backwards'
2015-05-12 10:28:10 +01:00
Erik Johnston
84e6b4001f
Initial hack at wiring together pagination and backfill
2015-05-11 18:01:31 +01:00
Erik Johnston
17653a5dfe
Move storage.stream._StreamToken to types.RoomStreamToken
2015-05-11 18:01:01 +01:00
Mark Haines
e269c511f6
Don't bother passing the events to the notifier since it isn't using them
2015-05-11 15:01:51 +01:00
Mark Haines
5e3b254dc8
Use wait_for_events to implement 'get_events'
2015-05-11 14:37:33 +01:00
Erik Johnston
79b7154454
Merge pull request #146 from matrix-org/erikj/push_rules_fixes
...
Fix 500 on push rule updates.
2015-05-11 11:33:47 +01:00
Erik Johnston
4ef556f650
Bump version
2015-05-11 11:31:04 +01:00
Erik Johnston
b036596b75
Prefer to use _simple_*.
2015-05-11 11:24:01 +01:00
Erik Johnston
cd525c0f5a
push_rules table expects an 'id' field
2015-05-11 11:24:01 +01:00
Erik Johnston
de87541862
Bump version
2015-05-10 10:51:08 +01:00
Erik Johnston
22d2f498fa
Fix push rule bug: can't insert bool into small int column
2015-05-10 10:50:51 +01:00
Erik Johnston
2236ef6c92
Fix up leak. Add warnings.
2015-05-08 19:53:34 +01:00
Erik Johnston
da1aa07db5
Add some docs
2015-05-08 16:52:49 +01:00
Erik Johnston
4ac1941592
PEP8
2015-05-08 16:33:01 +01:00
Erik Johnston
476899295f
Change the way we do logging contexts so that they survive divergences
2015-05-08 16:32:18 +01:00
Erik Johnston
fca28d243e
Change the way we create observers to deferreds so that we don't get spammed by 'unhandled errors'
2015-05-08 16:28:08 +01:00
Erik Johnston
0cd1401f8d
Bump version
2015-05-08 16:11:51 +01:00
Erik Johnston
724bb1e7d9
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-05-08 16:11:19 +01:00
Mark Haines
1c7912751e
Drop the old table not the new table
2015-05-08 16:04:32 +01:00
Mark Haines
9d36eb4eab
Rename unique constraint
2015-05-08 16:01:55 +01:00
Mark Haines
b0f71db3ff
Remove unsigned
2015-05-08 15:59:51 +01:00
Mark Haines
84e1cacea4
Bump schema version
2015-05-08 15:58:14 +01:00
Mark Haines
6538d445e8
Make the timestamps in server_keys_json bigints
2015-05-08 15:55:17 +01:00
Erik Johnston
126d562576
Bump version
2015-05-08 13:29:37 +01:00
Paul "LeoNerd" Evans
45543028bb
Use the presence cachemap ordering to early-abort the iteration loop
2015-05-07 22:40:10 +01:00
Paul "LeoNerd" Evans
f683b5de47
Store presence cachemap in an ordered dict, so that the newer serials will be at the end
2015-05-07 21:27:53 +01:00
Erik Johnston
db0dca2f6f
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-05-07 19:21:00 +01:00
Erik Johnston
a151693a3b
Bump syweb version
2015-05-07 18:01:46 +01:00
Mark Haines
dfa98f911b
revert accidental bcrypt gensalt round reduction from loadtesting
2015-05-07 17:45:42 +01:00
Mark Haines
ef8e8ebd91
pynacl-0.3.0 was released so we can finally start using it directly from pypi
2015-05-07 16:46:51 +01:00
David Baker
97a64f3ebe
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2015-05-07 09:33:42 +01:00
David Baker
b850c9fa04
Typo
2015-05-07 09:33:30 +01:00
Mark Haines
4a7a4a5b6c
Optional profiling using cProfile
2015-05-06 17:08:00 +01:00
Mark Haines
b994fb2b96
Don't read from the config file before checking it exists
2015-05-06 12:56:47 +01:00
Erik Johnston
04c01882fc
Bump version
2015-05-06 09:59:13 +01:00
Erik Johnston
0c4ac271ca
Merge branch 'erikj/executemany' of github.com:matrix-org/synapse into erikj/SYN-371
2015-05-05 18:21:19 +01:00
Erik Johnston
0cf7e480b4
And use buffer(...) there as well
2015-05-05 18:20:01 +01:00
Erik Johnston
ed2584050f
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/executemany
2015-05-05 18:15:20 +01:00
Erik Johnston
977338a7af
Use buffer(...) when inserting into bytea column
2015-05-05 18:12:53 +01:00
Mark Haines
31049c4d72
Merge pull request #139 from matrix-org/bugs/SYN-369
...
Fix race with cache invalidation. SYN-369
2015-05-05 17:46:13 +01:00
Mark Haines
deb0237166
Add some doc-string
2015-05-05 17:45:11 +01:00
Mark Haines
e45b05647e
Fix the --help option for synapse
2015-05-05 17:39:59 +01:00
Erik Johnston
3d5a955e08
Missed events are not outliers
2015-05-05 17:36:57 +01:00
Mark Haines
d18f37e026
Collect the invalidate callbacks on the transaction object rather than passing around a separate list
2015-05-05 17:32:21 +01:00
Erik Johnston
9951542393
Add a comment about the zip(*[zip(sorted(...),...)])
2015-05-05 17:06:55 +01:00
Mark Haines
041b6cba61
SYN-369: Add comments to the sequence number logic in the cache
2015-05-05 16:32:44 +01:00
Mark Haines
63075118a5
Add debug flag in synapse/storage/_base.py for debugging the cache logic by comparing what is in the cache with what was in the database on every access
2015-05-05 16:24:04 +01:00
Erik Johnston
531d7955fd
Don't insert without deduplication. In this case we never actually use this table, so simply remove the insert entirely
2015-05-05 16:12:28 +01:00
Mark Haines
bfa4a7f8b0
Invalidate the room_member cache if the current state events updates
2015-05-05 15:43:49 +01:00
Mark Haines
d0fece8d3c
Missing return for when the event was already persisted
2015-05-05 15:39:09 +01:00
Erik Johnston
bdcd7693c8
Fix indentation
2015-05-05 15:14:48 +01:00
Erik Johnston
43c2e8deae
Add support for using executemany
2015-05-05 15:13:25 +01:00
Erik Johnston
1692dc019d
Don't call 'encode_parameter' no-op
2015-05-05 15:00:30 +01:00
Mark Haines
a9aea68fd5
Invalidate the caches from the correct thread
2015-05-05 14:57:08 +01:00
Mark Haines
261d809a47
Sequence the modifications to the cache so that selects don't race with inserts
2015-05-05 14:13:50 +01:00
Erik Johnston
d9cc5de9e5
Correctly name transaction
2015-05-05 10:24:10 +01:00
Erik Johnston
b8940cd902
Remove some unused indexes
2015-05-01 16:14:25 +01:00
Erik Johnston
1942382246
Don't log enqueue_
2015-05-01 16:14:25 +01:00
David Baker
eb9bd2d949
user_id now in user_threepids
2015-05-01 15:04:37 +01:00
Erik Johnston
2d386d7038
That wasn't a deferred
2015-05-01 14:41:25 +01:00
Erik Johnston
4ac2823b3c
Remove inlineCallbacks from non-generator
2015-05-01 14:41:25 +01:00
Erik Johnston
22c7c5eb8f
Typo
2015-05-01 14:41:25 +01:00
Erik Johnston
42c12c04f6
Remove some run_on_reactors
2015-05-01 14:41:25 +01:00
Erik Johnston
adb5b76ff5
Don't log all auth events every time we call auth.check
2015-05-01 14:41:25 +01:00
Mark Haines
3bcdf3664c
Use the daemonize key from the config if it exists
2015-05-01 14:34:55 +01:00
David Baker
9eeb03c0dd
Don't use self.execute: it's designed for fetching stuff
2015-05-01 14:21:25 +01:00
Mark Haines
7b50769eb9
Merge pull request #136 from matrix-org/markjh/config_cleanup
...
Config restructuring.
2015-05-01 14:04:39 +01:00
David Baker
7693f24792
No id field on user
2015-05-01 13:55:42 +01:00
Mark Haines
46a65c282f
Allow generate-config to run against an existing config file to generate default keys
2015-05-01 13:54:38 +01:00
David Baker
92b20713d7
More missed get_user_by_id API changes
2015-05-01 13:45:54 +01:00