mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Run gofmt
This commit is contained in:
parent
00c6f3c9d9
commit
4bf3c37fd3
|
|
@ -15,20 +15,20 @@
|
||||||
package routing
|
package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/matrix-org/util"
|
|
||||||
"github.com/matrix-org/dendrite/clientapi/httputil"
|
"github.com/matrix-org/dendrite/clientapi/httputil"
|
||||||
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
||||||
"github.com/matrix-org/dendrite/common/config"
|
"github.com/matrix-org/dendrite/common/config"
|
||||||
"github.com/matrix-org/dendrite/roomserver/api"
|
"github.com/matrix-org/dendrite/roomserver/api"
|
||||||
"github.com/matrix-org/gomatrix"
|
"github.com/matrix-org/gomatrix"
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
|
"github.com/matrix-org/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RoomAliasToID converts the queried alias into a room ID and returns it
|
// RoomAliasToID converts the queried alias into a room ID and returns it
|
||||||
func RoomAliasToID (
|
func RoomAliasToID(
|
||||||
httpReq *http.Request,
|
httpReq *http.Request,
|
||||||
federation *gomatrixserverlib.FederationClient,
|
federation *gomatrixserverlib.FederationClient,
|
||||||
cfg config.Dendrite,
|
cfg config.Dendrite,
|
||||||
|
|
@ -43,7 +43,7 @@ func RoomAliasToID (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var resp gomatrixserverlib.RespDirectory
|
var resp gomatrixserverlib.RespDirectory
|
||||||
|
|
||||||
if domain == cfg.Matrix.ServerName {
|
if domain == cfg.Matrix.ServerName {
|
||||||
queryReq := api.GetAliasRoomIDRequest{Alias: roomAlias}
|
queryReq := api.GetAliasRoomIDRequest{Alias: roomAlias}
|
||||||
|
|
@ -52,7 +52,7 @@ var resp gomatrixserverlib.RespDirectory
|
||||||
return httputil.LogThenError(httpReq, err)
|
return httputil.LogThenError(httpReq, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (queryRes.RoomID == "") {
|
if queryRes.RoomID == "" {
|
||||||
// TODO: List servers that are aware of this room alias
|
// TODO: List servers that are aware of this room alias
|
||||||
resp = gomatrixserverlib.RespDirectory{
|
resp = gomatrixserverlib.RespDirectory{
|
||||||
RoomID: queryRes.RoomID,
|
RoomID: queryRes.RoomID,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue