mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-13 01:43:09 -06:00
Handle case with no alias set for a room
This commit is contained in:
parent
750642c45f
commit
44ab32c298
|
|
@ -67,6 +67,9 @@ func (s *roomAliasesStatements) insertRoomAlias(alias string, roomID string) (er
|
||||||
|
|
||||||
func (s *roomAliasesStatements) selectRoomIDFromAlias(alias string) (roomID string, err error) {
|
func (s *roomAliasesStatements) selectRoomIDFromAlias(alias string) (roomID string, err error) {
|
||||||
err = s.selectRoomIDFromAliasStmt.QueryRow(alias).Scan(&roomID)
|
err = s.selectRoomIDFromAliasStmt.QueryRow(alias).Scan(&roomID)
|
||||||
|
if err == sql.ErrNoRows {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue