summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-02 12:11:52 +0100
committerErik Johnston <erik@matrix.org>2014-09-02 12:12:14 +0100
commit4b8244fbf85df081e3abfa7a8e8754b66d671f49 (patch)
tree7f4990fb341949eb4f081000c3c7c077ceb51fd9 /synapse/storage
parentWhoops: Put /events parameters object in the right part of the api tree. (diff)
downloadsynapse-4b8244fbf85df081e3abfa7a8e8754b66d671f49.tar.xz
Fix bug where we didn't correctly store the ops power levels event.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/__init__.py3
-rw-r--r--synapse/storage/room.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 7a441391f0..aadaab06e7 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -23,6 +23,7 @@ from synapse.api.events.room import (
     RoomPowerLevelsEvent,
     RoomAddStateLevelEvent,
     RoomSendEventLevelEvent,
+    RoomOpsPowerLevelsEvent,
 )
 
 from synapse.util.logutils import log_function
@@ -140,6 +141,8 @@ class DataStore(RoomMemberStore, RoomStore,
             self._store_add_state_level(txn, event)
         elif event.type == RoomSendEventLevelEvent.TYPE:
             self._store_send_event_level(txn, event)
+        elif event.type == RoomOpsPowerLevelsEvent.TYPE:
+            self._store_ops_level(txn, event)
 
         vals = {
             "topological_ordering": event.depth,
diff --git a/synapse/storage/room.py b/synapse/storage/room.py
index 3ca07f4350..01ae190316 100644
--- a/synapse/storage/room.py
+++ b/synapse/storage/room.py
@@ -328,7 +328,7 @@ class RoomStore(SQLBaseStore):
 
         self._simple_insert_txn(
             txn,
-            "room_send_event_levels",
+            "room_ops_levels",
             content,
         )