Fix response to federation /invite to match the format expected by synapse (#221)
* Fix response to /invite to match the format expected by synapse * gb vendor update github.com/matrix-org/gomatrixserverlib * Use gomatrixserverlib.RespInvite * gb vendor update github.com/matrix-org/gomatrixserverlib
This commit is contained in:
parent
5740cb3e58
commit
6cb9d900b9
21 changed files with 148 additions and 64 deletions
|
|
@ -38,12 +38,12 @@ type DNSResult struct {
|
|||
}
|
||||
|
||||
// LookupServer looks up a matrix server in DNS.
|
||||
func LookupServer(serverName ServerName) (*DNSResult, error) {
|
||||
func LookupServer(serverName ServerName) (*DNSResult, error) { // nolint: gocyclo
|
||||
var result DNSResult
|
||||
result.Hosts = map[string]HostResult{}
|
||||
|
||||
hosts := map[string][]net.SRV{}
|
||||
if strings.Index(string(serverName), ":") == -1 {
|
||||
if !strings.Contains(string(serverName), ":") {
|
||||
// If there isn't an explicit port set then try to look up the SRV record.
|
||||
var err error
|
||||
result.SRVCName, result.SRVRecords, err = net.LookupSRV("matrix", "tcp", string(serverName))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue