Commit Graph

141 Commits

Author SHA1 Message Date
Erik Johnston 7b0d846407 Atomically persit push actions when we persist the event 2016-02-09 16:19:15 +00:00
Erik Johnston f28cc45183 Pass in current state to push action handler 2016-02-09 16:01:40 +00:00
Erik Johnston 2c1fbea531 Fix up logcontexts 2016-02-08 14:26:45 +00:00
Daniel Wagner-Hall d83d004ccd Fix flake8 warnings for new flake8 2016-02-02 17:18:50 +00:00
Daniel Wagner-Hall da417aa56d Allow non-guests to peek on rooms using /events 2016-01-20 15:34:07 +00:00
Erik Johnston 892ee473d9 Don't use form of get_state_for_events with None state_key 2016-01-19 17:14:46 +00:00
Erik Johnston 5a7d1ecffc Add regex cache. Only caculate push actions for users that have sent read receipts, and are on that server 2016-01-19 16:01:05 +00:00
Erik Johnston cc66a9a5e3 Allow filtering events for multiple users at once 2016-01-18 14:43:50 +00:00
Daniel Wagner-Hall b5ce4f0427 Remove unused parameters 2016-01-15 13:54:03 +00:00
David Baker c79f221192 Add is_guest flag to users db to track whether a user is a guest user or not. Use this so we can run _filter_events_for_client when calculating event_push_actions. 2016-01-06 11:38:09 +00:00
David Baker eb03625626 Merge remote-tracking branch 'origin/develop' into store_event_actions 2016-01-05 18:39:50 +00:00
Daniel Wagner-Hall 2ef6de928d Skip, rather than erroring, invalid guest requests
Erroring causes problems when people make illegal requests, because they
don't know what limit parameter they should pass.

This is definitely buggy. It leaks message counts for rooms people don't
have permission to see, via tokens. But apparently we already
consciously decided to allow that as a team, so this preserves that
behaviour.
2016-01-05 18:12:37 +00:00
David Baker 3051c9d002 Address minor PR issues 2016-01-04 13:39:29 +00:00
David Baker f73f154ec2 Only run pushers for users on this hs! 2015-12-21 15:28:54 +00:00
David Baker 21f135ba76 Very first cut of calculating actions for events as they come in. Doesn't store them yet. Not very efficient. 2015-12-10 16:26:08 +00:00
Daniel Wagner-Hall 9da4c5340d Simplify code 2015-11-19 10:07:21 -05:00
Daniel Wagner-Hall bed7889703 Apply forgetting properly to historical events 2015-11-18 18:11:12 -05: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 38d82edf0e Allow guest users to join and message rooms 2015-11-10 16:57:13 +00:00
Daniel Wagner-Hall 2cebe53545 Exchange 3pid invites for m.room.member invites 2015-11-05 16:43:19 +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
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
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 366af6b73a Amalgamate _filter_events_for_client 2015-10-16 14:52:48 +01:00
Daniel Wagner-Hall 0c38e8637f Remove unnecessary class-wrapping 2015-10-13 18:00:38 +01:00
Daniel Wagner-Hall 17dffef5ec Move event contents into third_party_layout field 2015-10-13 15:48:12 +01:00
Daniel Wagner-Hall 61ee72517c Remove merge thinko 2015-10-06 10:16:15 -05:00
Daniel Wagner-Hall 58e6a58eb7 Merge branch 'develop' into daniel/3pidinvites 2015-10-05 10:33:41 -05:00
Erik Johnston 9c311dfce5 Also bundle in sender 2015-10-02 11:04:23 +01:00
Daniel Wagner-Hall 5b3e9713dd Implement third party identifier invites 2015-10-01 17:49:52 +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
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
Erik Johnston 51c53369a3 Do auth checks *before* persisting the event 2015-08-24 16:38:20 +01:00
Erik Johnston aadb2238c9 Check that the canonical room alias actually points to the room 2015-08-20 09:55:04 +01:00
Erik Johnston 55bf90b9e4 Don't needlessly compute prev_state 2015-06-03 16:44:24 +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 2236ef6c92 Fix up leak. Add warnings. 2015-05-08 19:53:34 +01:00
Erik Johnston 2d386d7038 That wasn't a deferred 2015-05-01 14:41:25 +01:00
Erik Johnston e1c0970c11 PEP8 2015-04-16 11:18:45 +01:00
Erik Johnston d5ff9effcf Don't wait on federation_handler.handle_new_event 2015-04-15 15:05:57 +01:00
Erik Johnston e845434028 Remove run_on_reactor()s 2015-04-15 15:05:45 +01:00
Erik Johnston cd2539ab2a Merge pull request #110 from matrix-org/fix_ban
Fix ban
2015-03-16 15:36:52 +00:00
Erik Johnston 857810d2dd Revert incorrect changes to where we send events 2015-03-16 15:12:47 +00:00
Erik Johnston c2c9471cba Don't block waiting on waking up all the listeners when sending an event. 2015-03-16 13:16:37 +00:00
Erik Johnston b2e6ee5b43 Remove concept of context.auth_events, instead use context.current_state 2015-03-16 13:06:23 +00:00
Erik Johnston 758d114cbc Send all membership events to the remote homeserver 2015-03-16 00:27:59 +00:00
Mark Haines 5759bec43c Replace hs.parse_userid with UserID.from_string 2015-01-23 11:47:15 +00:00
Mark Haines 5fed042640 Finish renaming "context" to "room_id" in federation codebase 2015-01-16 19:01:03 +00:00
Mark Haines adb04b1e57 Update copyright notices 2015-01-06 13:21:39 +00:00
Mark Haines c3eae8a88c Construct the EventContext in the state handler rather than constructing one and then immediately calling state_handler.annotate_context_with_state 2014-12-16 15:59:17 +00:00
Mark Haines 3c7857e49b clean up coding style a bit 2014-12-16 15:24:03 +00:00
Erik Johnston cf6e5f1dbf Rename MessageHandler.handle_event. Add a few comments. 2014-12-15 17:01:12 +00:00
Erik Johnston 02e4c18171 Remove dead code 2014-12-10 18:00:36 +00:00
Erik Johnston 02db7eb209 Fix bug when uploading state with empty state_key 2014-12-10 14:02:48 +00:00
Erik Johnston 018443cb59 Make depth increase. 2014-12-10 11:59:53 +00:00
Erik Johnston 5eca288d28 Fix joining from an invite 2014-12-09 14:47:27 +00:00
Erik Johnston 4e57943cc5 Remove unused import 2014-12-09 10:51:36 +00:00
Erik Johnston ee3df06183 More bug fixes 2014-12-08 14:50:48 +00:00
Erik Johnston e8323b9e34 More bug fixes 2014-12-08 10:16:18 +00:00
Erik Johnston d044121168 Various typos and bug fixes. 2014-12-08 09:08:26 +00:00
Erik Johnston 6630e1b579 Start making more things use EventContext rather than event.* 2014-12-05 16:20:48 +00:00
Erik Johnston c31dba86ec Convert rest and handlers to use new event structure 2014-12-04 15:50:01 +00:00
Erik Johnston 5d7c9ab789 Begin converting things to use the new Event structure 2014-12-04 11:27:59 +00:00
Erik Johnston 75b4329aaa WIP for new way of managing events. 2014-12-03 16:07:21 +00:00
Erik Johnston 64fc859dac Fix bugs in invite/join dances.
We now do more implement more of the auth on the events so that we
don't reject valid events.
2014-11-25 17:59:49 +00:00
Mark Haines 32090aee16 Add a few missing yields, Move deferred lists inside PreserveLoggingContext because they don't interact well with the logging contexts 2014-11-20 16:24:00 +00:00
Erik Johnston 3db2c0d43e Rename annotate_state_groups to annotate_event_with_state 2014-11-11 16:58:53 +00:00
Erik Johnston 07286a73b1 Use current state to get room hosts, rather than querying the database 2014-11-07 16:03:31 +00:00
Erik Johnston d2fb2b8095 Implement invite part of invite join dance 2014-11-07 13:41:00 +00:00
Erik Johnston 49948d72f3 Fix joining over federation 2014-11-07 10:53:38 +00:00
Erik Johnston bf6b72eb55 Start implementing auth chains 2014-11-07 10:53:38 +00:00
Erik Johnston 96c001e668 Fix auth checks to all use the given old_event_state 2014-11-05 11:07:54 +00:00
Erik Johnston 7249785bcb Sign events we create. 2014-11-03 11:33:28 +00:00
Erik Johnston e7858b6d7e Start filling out and using new events tables 2014-10-29 16:59:24 +00:00
Erik Johnston e7bc1291a0 Begin making auth use event.old_state_events 2014-10-15 16:06:59 +01:00
Erik Johnston 9dd4570b68 Generate m.room.aliases event when the HS creates a room alias 2014-09-05 21:35:56 +01:00
Matthew Hodgson 8a7c1d6a00 fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org hasn't been incorporated in time for launch. 2014-09-03 17:31:57 +01:00
Mark Haines 112c7ea315 Set status message for ratelimit error responses 2014-09-03 09:37:44 +01:00
Mark Haines 683596f91e Raise LimitExceedError when the ratelimiting is throttling requests 2014-09-03 08:58:48 +01:00
Mark Haines 780548b577 rate limiting for message sending 2014-09-02 18:22:15 +01:00
Mark Haines c7a7cdf734 Add ratelimiting function to basehandler 2014-09-02 17:57:04 +01:00
Mark Haines 7acede1e42 Fix pyflakes warnings 2014-08-28 13:51:50 +01:00
Mark Haines 357dd1871d Merge branch 'develop' into storage_transactions
Conflicts:
	tests/handlers/test_federation.py
	tests/handlers/test_room.py
2014-08-27 17:28:55 +01:00
Mark Haines 2aeaa7b77c Merge branch 'develop' into storage_transactions
Conflicts:
	synapse/handlers/room.py
	synapse/storage/stream.py
2014-08-27 17:15:58 +01:00
Mark Haines a03c7f27a8 Fill out prev_events before calling persist_event 2014-08-27 14:32:19 +01:00
Mark Haines d2798de660 Fold federation/handler into handlers/federation 2014-08-26 19:49:42 +01:00
Mark Haines a498df0428 Move new event boilerplate in room handlers into a method on a base clase. 2014-08-26 18:49:51 +01:00
Erik Johnston 1587ea26fe Wait for getting a Join in response to an invite/join dance. 2014-08-21 14:38:22 +01:00
Matthew Hodgson f98e6380f1 add in whitespace after copyright statements to improve legibility 2014-08-13 03:14:34 +01:00
matrix.org 4f475c7697 Reference Matrix Home Server 2014-08-12 15:10:52 +01:00