summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/__init__.py1
-rw-r--r--synapse/storage/_base.py1
-rw-r--r--synapse/storage/directory.py1
-rw-r--r--synapse/storage/feedback.py1
-rw-r--r--synapse/storage/message.py1
-rw-r--r--synapse/storage/pdu.py1
-rw-r--r--synapse/storage/presence.py1
-rw-r--r--synapse/storage/profile.py1
-rw-r--r--synapse/storage/registration.py1
-rw-r--r--synapse/storage/room.py8
-rw-r--r--synapse/storage/roomdata.py1
-rw-r--r--synapse/storage/roommember.py1
-rw-r--r--synapse/storage/stream.py1
-rw-r--r--synapse/storage/transactions.py1
14 files changed, 19 insertions, 2 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index ec93f9f8a7..3c27428c08 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
 from synapse.api.events.room import (
     RoomMemberEvent, MessageEvent, RoomTopicEvent, FeedbackEvent,
     RoomConfigEvent
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 4d98a6fd0d..65f691ead4 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 import logging
 
 from twisted.internet import defer
diff --git a/synapse/storage/directory.py b/synapse/storage/directory.py
index 71fa9d9c9c..b22ce02f3f 100644
--- a/synapse/storage/directory.py
+++ b/synapse/storage/directory.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from ._base import SQLBaseStore
 from twisted.internet import defer
 
diff --git a/synapse/storage/feedback.py b/synapse/storage/feedback.py
index 2b421e3342..9bd562c762 100644
--- a/synapse/storage/feedback.py
+++ b/synapse/storage/feedback.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from ._base import SQLBaseStore, Table
 from synapse.api.events.room import FeedbackEvent
 
diff --git a/synapse/storage/message.py b/synapse/storage/message.py
index 4822fa709d..7bb69c1384 100644
--- a/synapse/storage/message.py
+++ b/synapse/storage/message.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from ._base import SQLBaseStore, Table
 from synapse.api.events.room import MessageEvent
 
diff --git a/synapse/storage/pdu.py b/synapse/storage/pdu.py
index a1cdde0a3b..202d7f6cb6 100644
--- a/synapse/storage/pdu.py
+++ b/synapse/storage/pdu.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from ._base import SQLBaseStore, Table, JoinHelper
 
 from synapse.util.logutils import log_function
diff --git a/synapse/storage/presence.py b/synapse/storage/presence.py
index e57ddaf149..6f5b042c25 100644
--- a/synapse/storage/presence.py
+++ b/synapse/storage/presence.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from ._base import SQLBaseStore
 
 
diff --git a/synapse/storage/profile.py b/synapse/storage/profile.py
index d2f24930c1..91dd565033 100644
--- a/synapse/storage/profile.py
+++ b/synapse/storage/profile.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from ._base import SQLBaseStore
 
 
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 4a970dd546..68cdfbb4ca 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from twisted.internet import defer
 
 from sqlite3 import IntegrityError
diff --git a/synapse/storage/room.py b/synapse/storage/room.py
index 174cbcf3d8..a97162831b 100644
--- a/synapse/storage/room.py
+++ b/synapse/storage/room.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from twisted.internet import defer
 
 from sqlite3 import IntegrityError
@@ -92,7 +93,10 @@ class RoomStore(SQLBaseStore):
         latest_topic = ("SELECT max(room_data.id) FROM room_data WHERE "
                         + "room_data.type = ? GROUP BY room_id")
 
-        query = ("SELECT rooms.*, room_data.content FROM rooms LEFT JOIN "
+        query = ("SELECT rooms.*, room_data.content, room_alias FROM rooms "
+                 + "LEFT JOIN "
+                 + "room_aliases ON room_aliases.room_id = rooms.room_id "
+                 + "LEFT JOIN "
                  + "room_data ON rooms.room_id = room_data.room_id WHERE "
                  + "(room_data.id IN (" + latest_topic + ") "
                  + "OR room_data.id IS NULL) AND rooms.is_public = ?")
@@ -102,7 +106,7 @@ class RoomStore(SQLBaseStore):
         )
 
         # return only the keys the specification expects
-        ret_keys = ["room_id", "topic"]
+        ret_keys = ["room_id", "topic", "room_alias"]
 
         # extract topic from the json (icky) FIXME
         for i, room_row in enumerate(res):
diff --git a/synapse/storage/roomdata.py b/synapse/storage/roomdata.py
index 781d477931..cc04d1ba14 100644
--- a/synapse/storage/roomdata.py
+++ b/synapse/storage/roomdata.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from ._base import SQLBaseStore, Table
 
 import collections
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index e6e7617797..ef73be4af4 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from twisted.internet import defer
 
 from synapse.types import UserID
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index c3b1bfeb32..1dedffac49 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
 from ._base import SQLBaseStore
 from .message import MessagesTable
 from .feedback import FeedbackTable
diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py
index aa41e2ad7f..a277e4971a 100644
--- a/synapse/storage/transactions.py
+++ b/synapse/storage/transactions.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from ._base import SQLBaseStore, Table
 from .pdu import PdusTable