From 44ab32c29831f94569729f7771e16d43f369bf6a Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Thu, 27 Jul 2017 16:29:23 +0100 Subject: [PATCH] Handle case with no alias set for a room --- .../dendrite/roomserver/storage/room_aliases_table.go | 3 +++ 1 file changed, 3 insertions(+) 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 09e1b181c..a060a1b50 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 @@ -67,6 +67,9 @@ func (s *roomAliasesStatements) insertRoomAlias(alias string, roomID string) (er func (s *roomAliasesStatements) selectRoomIDFromAlias(alias string) (roomID string, err error) { err = s.selectRoomIDFromAliasStmt.QueryRow(alias).Scan(&roomID) + if err == sql.ErrNoRows { + return "", nil + } return }