diff options
author | Erik Johnston <erik@matrix.org> | 2015-01-30 14:19:49 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-01-30 14:19:49 +0000 |
commit | c515d377973560a6e9d96fa5ee53e1de7dc67347 (patch) | |
tree | ec58161881f5d9180a41bb8610152cfe5ff0ddc5 /synapse | |
parent | Fix bug where we superfluously asked for current state. Change API of /query_... (diff) | |
parent | Merge branch 'rejections_storage' of github.com:matrix-org/synapse into repli... (diff) | |
download | synapse-c515d377973560a6e9d96fa5ee53e1de7dc67347.tar.xz |
Merge branch 'replication_split' of github.com:matrix-org/synapse into rejections
Conflicts: synapse/storage/schema/delta/v12.sql
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/python_dependencies.py | 2 | ||||
-rw-r--r-- | synapse/state.py | 8 | ||||
-rw-r--r-- | synapse/storage/schema/delta/v12.sql | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 4182ad990f..826a36f203 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -6,7 +6,7 @@ logger = logging.getLogger(__name__) REQUIREMENTS = { "syutil==0.0.2": ["syutil"], "matrix_angular_sdk==0.6.0": ["syweb>=0.6.0"], - "Twisted>=14.0.0": ["twisted>=14.0.0"], + "Twisted==14.0.2": ["twisted==14.0.2"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], "pyyaml": ["yaml"], diff --git a/synapse/state.py b/synapse/state.py index e6632978b5..bb439ed9d0 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -37,13 +37,15 @@ def _get_state_key_from_event(event): KeyStateTuple = namedtuple("KeyStateTuple", ("context", "type", "state_key")) +AuthEventTypes = (EventTypes.Create, EventTypes.Member, EventTypes.PowerLevels,) + + class StateHandler(object): """ Responsible for doing state conflict resolution. """ def __init__(self, hs): self.store = hs.get_datastore() - # self.auth = hs.get_auth() self.hs = hs @defer.inlineCallbacks @@ -231,7 +233,7 @@ class StateHandler(object): auth_events = { k: e for k, e in unconflicted_state.items() - if k[0] in (EventTypes.Create, EventTypes.Member, EventTypes.PowerLevels,) + if k[0] in AuthEventTypes } try: @@ -317,4 +319,4 @@ class StateHandler(object): def key_func(e): return -int(e.depth), hashlib.sha1(e.event_id).hexdigest() - return sorted(events, key=key_func) \ No newline at end of file + return sorted(events, key=key_func) diff --git a/synapse/storage/schema/delta/v12.sql b/synapse/storage/schema/delta/v12.sql index d83c3b049e..c7e396beb6 100644 --- a/synapse/storage/schema/delta/v12.sql +++ b/synapse/storage/schema/delta/v12.sql @@ -1,8 +1,4 @@ -<<<<<<< HEAD /* Copyright 2015 OpenMarket Ltd -======= -/* Copyright 2014 OpenMarket Ltd ->>>>>>> fc946f3b8da8c7f71a9c25bf542c04472147bc5b * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,4 +53,3 @@ CREATE TABLE IF NOT EXISTS push_rules ( ); CREATE INDEX IF NOT EXISTS push_rules_user_name on push_rules (user_name); - |