summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-10 18:00:36 +0000
committerErik Johnston <erik@matrix.org>2014-12-10 18:00:36 +0000
commit02e4c181714b94e86cf621307f2dfc765a62ad83 (patch)
tree2fa4c7f6aff1e8358f4dcbad28ab54b51f7548ee /synapse
parentAdd some basic event validation (diff)
downloadsynapse-02e4c181714b94e86cf621307f2dfc765a62ad83.tar.xz
Remove dead code
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/_base.py2
-rw-r--r--synapse/storage/_base.py25
2 files changed, 0 insertions, 27 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index fdd3151877..14f75ecbc2 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -32,10 +32,8 @@ class BaseHandler(object):
 
     def __init__(self, hs):
         self.store = hs.get_datastore()
-        self.event_factory = hs.get_event_factory()
         self.auth = hs.get_auth()
         self.notifier = hs.get_notifier()
-        self.room_lock = hs.get_room_lock_manager()
         self.state_handler = hs.get_state_handler()
         self.distributor = hs.get_distributor()
         self.ratelimiter = hs.get_ratelimiter()
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 935a167f6f..12239fa074 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -436,31 +436,6 @@ class SQLBaseStore(object):
 
         return self.runInteraction("_simple_max_id", func)
 
-    def _parse_event_from_row(self, row_dict):
-        d = copy.deepcopy({k: v for k, v in row_dict.items()})
-
-        d.pop("stream_ordering", None)
-        d.pop("topological_ordering", None)
-        d.pop("processed", None)
-        d["origin_server_ts"] = d.pop("ts", 0)
-        replaces_state = d.pop("prev_state", None)
-
-        if replaces_state:
-            d["replaces_state"] = replaces_state
-
-        d.update(json.loads(row_dict["unrecognized_keys"]))
-        d["content"] = json.loads(d["content"])
-        del d["unrecognized_keys"]
-
-        if "age_ts" not in d:
-            # For compatibility
-            d["age_ts"] = d.get("origin_server_ts", 0)
-
-        return self.event_factory.create_event(
-            etype=d["type"],
-            **d
-        )
-
     def _get_events(self, event_ids):
         return self.runInteraction(
             "_get_events", self._get_events_txn, event_ids