diff --git a/src/github.com/matrix-org/dendrite/publicroomsapi/storage/public_rooms_table.go b/src/github.com/matrix-org/dendrite/publicroomsapi/storage/public_rooms_table.go index 75bf4bf41..6ebeeb315 100644 --- a/src/github.com/matrix-org/dendrite/publicroomsapi/storage/public_rooms_table.go +++ b/src/github.com/matrix-org/dendrite/publicroomsapi/storage/public_rooms_table.go @@ -226,7 +226,10 @@ func (s *publicRoomsStatements) updateRoomAttribute(attrName string, attrValue a var value interface{} if attrName == "aliases" { // Aliases need a special conversion - value = pq.StringArray(attrValue.([]string)) + if value, err = pq.StringArray(attrValue.([]string)); err != nil { + // attrValue isn't a slice of strings + return err + } } else { value = attrValue } diff --git a/src/github.com/matrix-org/dendrite/roomserver/storage/room_aliases_table.go b/src/github.com/matrix-org/dendrite/roomserver/storage/room_aliases_table.go index 433835d7a..bfd6cc090 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/storage/room_aliases_table.go +++ b/src/github.com/matrix-org/dendrite/roomserver/storage/room_aliases_table.go @@ -27,7 +27,7 @@ CREATE TABLE IF NOT EXISTS roomserver_room_aliases ( room_id TEXT NOT NULL ); -CREATE UNIQUE INDEX IF NOT EXISTS roomserver_room_id_idx ON roomserver_room_aliases(room_id); +CREATE INDEX IF NOT EXISTS roomserver_room_id_idx ON roomserver_room_aliases(room_id); ` const insertRoomAliasSQL = "" +