summary refs log tree commit diff
path: root/synapse/storage/stream.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-14 18:40:50 +0100
committerErik Johnston <erik@matrix.org>2014-08-14 18:40:50 +0100
commit2c46bb620828efaebdbae37e5212a28b505ee72d (patch)
tree9b10dfb00f35b00f9b6e6d49feb22a5e9207ce19 /synapse/storage/stream.py
parentUpdate StreamStore (diff)
downloadsynapse-2c46bb620828efaebdbae37e5212a28b505ee72d.tar.xz
Fix up typos and correct sql queries
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r--synapse/storage/stream.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 1456d216f0..9937239c22 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -13,12 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from twisted.internet import defer
 
 from ._base import SQLBaseStore
-from .message import MessagesTable
-from .feedback import FeedbackTable
-from .roomdata import RoomDataTable
-from .roommember import RoomMemberTable
 
 from synapse.api.constants import Membership
 
@@ -40,13 +37,13 @@ class StreamStore(SQLBaseStore):
 
         current_room_membership_sql = (
             "SELECT m.room_id FROM room_memberships as m "
-            "INNER JOIN current_state as c ON m.event_id = c.event_id "
+            "INNER JOIN current_state_events as c ON m.event_id = c.event_id "
             "WHERE m.user_id = ?"
         )
 
         invites_sql = (
             "SELECT m.event_id FROM room_membershipas as m "
-            "INNER JOIN current_state as c ON m.event_id = c.event_id "
+            "INNER JOIN current_state_events as c ON m.event_id = c.event_id "
             "WHERE m.user_id = ? AND m.membership = ?"
         )
 
@@ -71,4 +68,4 @@ class StreamStore(SQLBaseStore):
             user_id, user_id, Membership.INVITE
         )
 
-        defer.returnValue([self._parse_event_from_row(r) for r in results])
+        defer.returnValue([self._parse_event_from_row(r) for r in rows])