Matthew Hodgson
2f4b2f4783
gah, fix mangled merge of 0.18.7 into develop
2017-01-07 04:00:42 +00:00
Mark Haines
f784980d2b
Only send events that originate on this server.
...
Or events that are sent via the federation "send_join" API.
This should match the behaviour from before v0.18.5 and #1635 landed.
2017-01-05 11:26:30 +00:00
Kegan Dougal
c3d963ac24
Review comments
2016-11-22 13:42:11 +00:00
Kegan Dougal
6d4e6d4cba
Also check for dict since sometimes they aren't frozen
2016-11-22 10:39:41 +00:00
Kegan Dougal
cea4e4e7b2
Glue only_event_fields into the sync rest servlet
2016-11-22 10:14:05 +00:00
Kegan Dougal
0a8b0eeca1
More tests
2016-11-22 09:59:27 +00:00
Kegan Dougal
70a2157b64
Start adding some tests
2016-11-21 17:52:45 +00:00
Kegan Dougal
f97511a1f3
Move event_fields filtering to serialize_event
...
Also make it an inclusive not exclusive filter, as the spec demands.
2016-11-21 17:42:16 +00:00
Erik Johnston
628e65721b
Add comments
2016-09-05 10:41:27 +01:00
Erik Johnston
9e25443db8
Move to storing state_groups_state as deltas
2016-09-01 14:31:26 +01:00
Erik Johnston
c10cb581c6
Correctly handle the difference between prev and current state
2016-08-31 14:26:22 +01:00
Erik Johnston
54cc69154e
Make None optional
2016-08-26 11:20:59 +01:00
Erik Johnston
a3dc1e9cbe
Replace context.current_state with context.current_state_ids
2016-08-25 17:32:22 +01:00
Erik Johnston
17f4f14df7
Pull out event ids rather than full events for state
2016-08-25 13:42:44 +01:00
Erik Johnston
1d40373c9d
Include prev_content in redacted state events
2016-08-11 10:24:41 +01:00
Mark Haines
76503f95ed
Remove the is_new_state argument to persist event.
...
Move the checks for whether an event is new state inside persist
event itself.
This was harder than expected because there wasn't enough information
passed to persist event to correctly handle invites from remote servers
for new rooms.
2016-03-31 15:00:42 +01:00
Mark Haines
1e25f62ee6
Use a stream id generator to assign state group ids
2016-03-30 12:55:02 +01:00
Erik Johnston
acdfef7b14
Intern all the things
2016-03-23 16:25:54 +00:00
Erik Johnston
f96526ffc2
Intern sender, event_id and room_id in events
2016-03-23 15:04:11 +00:00
Erik Johnston
fe9794706a
Intern type and state_key on events
2016-03-23 14:58:08 +00:00
Erik Johnston
58e207cd77
Don't assume existence of event_id in __str__
2016-03-18 14:31:44 +00:00
Erik Johnston
7b0d846407
Atomically persit push actions when we persist the event
2016-02-09 16:19:15 +00:00
Erik Johnston
2068678b8c
Make Event objects behave more like dicts
2016-01-18 14:43:50 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Mark Haines
306415391d
Only add the user_id if the sender is present
2015-12-01 11:14:48 +00:00
Mark Haines
bde8d78b8a
Copy rather than move the fields to shuffle between a v1 and a v2 event.
...
This should make all v1 APIs compatible with v2 clients. While still
allowing v1 clients to access the fields.
This makes the documentation easier since we can just document the v2
format and explain that some of the fields, in some of the APIs are
duplicated for backwards compatibility, rather than having to document
two separate event formats.
2015-11-30 17:46:35 +00:00
Richard van der Hoff
3c3fc6b268
Flatten the /sync response to remove the event_map
2015-11-19 10:51:11 +00:00
Mark Haines
d58edd98e9
Update the other place check_joined_room is called
2015-10-30 11:15:37 +00:00
Paul "LeoNerd" Evans
243a79d291
Surely we don't need to preserve 'events_default' twice
2015-10-16 18:25:19 +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
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
fb47c3cfbe
Rename key and values for m.room.history_visibility. Support 'invited' value
2015-07-06 13:05:52 +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
ca580ef862
Don't copy twice
2015-05-29 15:02:55 +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
Paul "LeoNerd" Evans
1b988b051b
Store the rejected reason in (Frozen)Event structs
2015-03-25 19:06:05 +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
7eef84a95b
pyflakes
2015-02-11 16:52:22 +00:00
Erik Johnston
ddb816cf60
Don't unfreeze when using FreezeEvent.get_dict, as we are using a JSONEncoder that understands FrozenDict
2015-02-11 15:44:28 +00:00
Erik Johnston
c0462dbf15
Rearrange persist_event so that do all the queries that need to be done before returning early if we have already persisted that event.
2015-02-04 10:16:51 +00:00
Erik Johnston
9bace3a367
Actually, the old prune_event function was non-deterministic, so no point keeping it around :(
2015-02-03 15:32:17 +00:00
Erik Johnston
0dd3aea319
Keep around the old (buggy) version of the prune_event function so that we can use it to check signatures for events on old servers
2015-02-03 14:58:30 +00:00
Erik Johnston
7d897f5bfc
Merge pull request #43 from matrix-org/rejections
...
Rejections
2015-01-30 16:11:14 +00:00
Mark Haines
6dc92d3427
Merge pull request #41 from matrix-org/client_v2_sync
...
Client v2 sync
2015-01-30 15:54:25 +00:00
Erik Johnston
e0b7c521cb
Merge branch 'develop' of github.com:matrix-org/synapse into rejections_storage
...
Conflicts:
synapse/storage/__init__.py
synapse/storage/schema/delta/v12.sql
2015-01-30 14:08:28 +00:00
Erik Johnston
2ebf795c0a
Merge branch 'develop' of github.com:matrix-org/synapse into rejections
...
Conflicts:
synapse/storage/__init__.py
synapse/storage/schema/delta/v12.sql
2015-01-30 11:10:37 +00:00
Erik Johnston
c1c7b39827
Fix bug where we changes in outlier in metadata dict propogated to other events
2015-01-30 10:30:54 +00:00
Erik Johnston
78015948a7
Initial implementation of auth conflict resolution
2015-01-29 16:52:33 +00:00
Mark Haines
b9c442c85c
Include transaction ids in unsigned section of events in the sync results for the clients that made those requests
2015-01-29 02:46:00 +00:00
Mark Haines
1b4a164c02
Add support for formatting events in the way a v2 client expects
2015-01-29 02:34:35 +00:00