diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-14 18:40:50 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-14 18:40:50 +0100 |
commit | 2c46bb620828efaebdbae37e5212a28b505ee72d (patch) | |
tree | 9b10dfb00f35b00f9b6e6d49feb22a5e9207ce19 /synapse/storage/stream.py | |
parent | Update StreamStore (diff) | |
download | synapse-2c46bb620828efaebdbae37e5212a28b505ee72d.tar.xz |
Fix up typos and correct sql queries
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/stream.py | 11 |
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]) |