Commit Graph

106 Commits

Author SHA1 Message Date
Richard van der Hoff
a85179aff3 Merge remote-tracking branch 'origin/develop' into rav/SYN-642 2016-03-03 19:05:54 +00:00
Daniel Wagner-Hall
b4022cc487 Pass whole requester to ratelimiting
This will enable more detailed decisions
2016-03-03 16:43:42 +00:00
Richard van der Hoff
863d3f26b3 fix pyflakes quibble 2016-03-02 15:52:50 +00:00
Richard van der Hoff
9ff940a0ef Address review comments 2016-03-02 15:40:30 +00:00
Richard van der Hoff
05ea111c47 Fix pyflakes warning 2016-03-01 17:45:24 +00:00
Richard van der Hoff
8a1d3b86af Handle rejections of invites from local users locally
Slightly hacky fix to SYN-642, which avoids the federation codepath when trying
to reject invites from local users.
2016-03-01 17:27:22 +00:00
David Baker
0f0b011440 Send the invier's member event in room invite state so the invitee has their display name and avatar. 2016-02-25 18:12:09 +00:00
Richard van der Hoff
5be3944730 address review comments
drop commented-out special casing for historyvisibility event
s/he/they/ for users
2016-02-22 15:27:44 +00:00
Richard van der Hoff
6c5b147a39 Interpret unknown visibilities the same as shared 2016-02-19 17:11:11 +00:00
Richard van der Hoff
05aee12652 Merge branch 'develop' into rav/guest_access_after_room_join 2016-02-19 12:00:16 +00:00
Richard van der Hoff
b71ca2b014 Allow guest users access to messages in rooms they have joined
There should be no difference between guest users and non-guest users in terms
of access to messages. Define the semantics of the is_peeking argument to
filter_events_for_clients (slightly) better; interpret it appropriately, and
set it correctly from /sync.
2016-02-19 11:41:02 +00:00
Daniel Wagner-Hall
f8d21e1431 Review comments 2016-02-18 11:02:14 +00:00
Daniel Wagner-Hall
a4e278bfe7 Respond to federated invite with non-empty context
Currently, we magically perform an extra database hit to find the
inviter, and use this to guess where we should send the event. Instead,
fill in a valid context, so that other callers relying on the context
actually have one.
2016-02-17 15:25:12 +00:00
Daniel Wagner-Hall
1bbb67c452 Use update_membership to kick guests 2016-02-15 16:40:22 +00:00
Daniel Wagner-Hall
e71095801f Merge implementation of /join by alias or ID
This code is kind of rough (passing the remote servers down a long
chain), but is a step towards improvement.
2016-02-15 15:39:16 +00:00
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