summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-01 13:44:19 +0100
committerErik Johnston <erik@matrix.org>2014-09-01 14:39:09 +0100
commit865469f233aa37d3fa0de9a77dfb6bc597c569d7 (patch)
tree2bbd9037e0ac535369c0eb8485f8610ba28d700c /synapse/storage/__init__.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into room_config (diff)
downloadsynapse-865469f233aa37d3fa0de9a77dfb6bc597c569d7.tar.xz
Implement power level lists, default power levels and send_evnet_level/add_state_level events.
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 204a243560..3d5e5049fa 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -21,7 +21,8 @@ from synapse.api.events.room import (
     RoomNameEvent,
     RoomJoinRulesEvent,
     RoomPowerLevelsEvent,
-    RoomDefaultLevelEvent,
+    RoomAddStateLevelEvent,
+    RoomSendEventLevelEvent,
 )
 
 from synapse.util.logutils import log_function
@@ -125,7 +126,7 @@ class DataStore(RoomMemberStore, RoomStore,
         if event.type == RoomMemberEvent.TYPE:
             self._store_room_member_txn(txn, event)
         elif event.type == FeedbackEvent.TYPE:
-            self._store_feedback_txn(txn,event)
+            self._store_feedback_txn(txn, event)
 #        elif event.type == RoomConfigEvent.TYPE:
 #            self._store_room_config_txn(txn, event)
         elif event.type == RoomNameEvent.TYPE:
@@ -136,8 +137,10 @@ class DataStore(RoomMemberStore, RoomStore,
             self._store_join_rule(txn, event)
         elif event.type == RoomPowerLevelsEvent.TYPE:
             self._store_power_levels(txn, event)
-        elif event.type == RoomDefaultLevelEvent.TYPE:
-            self._store_default_level(txn, event)
+        elif event.type == RoomAddStateLevelEvent.TYPE:
+            self._store_add_state_level(txn, event)
+        elif event.type == RoomSendEventLevelEvent.TYPE:
+            self._store_send_event_level(txn, event)
 
         vals = {
             "topological_ordering": event.depth,
@@ -231,7 +234,6 @@ class DataStore(RoomMemberStore, RoomStore,
 
         defer.returnValue(self.min_token)
 
-
     def snapshot_room(self, room_id, user_id, state_type=None, state_key=None):
         """Snapshot the room for an update by a user
         Args: