mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Ensure we return a non-empty list
This commit is contained in:
parent
69268fc48e
commit
70debce514
|
|
@ -70,7 +70,9 @@ func RoomAliasToID(
|
||||||
util.GetLogger(httpReq.Context()).WithError(err).Error("senderAPI.QueryJoinedHostServerNamesInRoom failed")
|
util.GetLogger(httpReq.Context()).WithError(err).Error("senderAPI.QueryJoinedHostServerNamesInRoom failed")
|
||||||
return jsonerror.InternalServerError()
|
return jsonerror.InternalServerError()
|
||||||
}
|
}
|
||||||
|
if !serverQueryReq.ExcludeSelf && len(serverQueryRes.ServerNames) == 0 {
|
||||||
|
serverQueryRes.ServerNames = []gomatrixserverlib.ServerName{domain}
|
||||||
|
}
|
||||||
resp = gomatrixserverlib.RespDirectory{
|
resp = gomatrixserverlib.RespDirectory{
|
||||||
RoomID: queryRes.RoomID,
|
RoomID: queryRes.RoomID,
|
||||||
Servers: serverQueryRes.ServerNames,
|
Servers: serverQueryRes.ServerNames,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue