mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 01:13:10 -06:00
gb vendor update github.com/matrix-org/gomatrixserverlib
This commit is contained in:
parent
4d51bffcae
commit
6b015e8a88
2
vendor/manifest
vendored
2
vendor/manifest
vendored
|
|
@ -116,7 +116,7 @@
|
||||||
{
|
{
|
||||||
"importpath": "github.com/matrix-org/gomatrixserverlib",
|
"importpath": "github.com/matrix-org/gomatrixserverlib",
|
||||||
"repository": "https://github.com/matrix-org/gomatrixserverlib",
|
"repository": "https://github.com/matrix-org/gomatrixserverlib",
|
||||||
"revision": "d7795024c9a5757a06bda0b09bd5af9379ce46fe",
|
"revision": "fe45d482f2280c9f92f09eb6650e7aa3cca051c5",
|
||||||
"branch": "master"
|
"branch": "master"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -315,6 +315,7 @@ func (e Event) Sign(signingName string, keyID KeyID, privateKey ed25519.PrivateK
|
||||||
return Event{
|
return Event{
|
||||||
redacted: e.redacted,
|
redacted: e.redacted,
|
||||||
eventJSON: eventJSON,
|
eventJSON: eventJSON,
|
||||||
|
fields: e.fields,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,10 @@ func (ac *FederationClient) doRequest(r FederationRequest, resBody interface{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if resBody == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return json.Unmarshal(contents, resBody)
|
return json.Unmarshal(contents, resBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,6 +129,22 @@ func (ac *FederationClient) SendJoin(s ServerName, event Event) (res RespSendJoi
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ExchangeThirdPartyInvite sends the builder of a m.room.member event of
|
||||||
|
// "invite" membership derived from a response from invites sent by an identity
|
||||||
|
// server.
|
||||||
|
// This is used to exchange a m.room.third_party_invite event for a m.room.member
|
||||||
|
// one in a room the local server isn't a member of.
|
||||||
|
func (ac *FederationClient) ExchangeThirdPartyInvite(s ServerName, builder EventBuilder) (err error) {
|
||||||
|
path := "/_matrix/federation/v1/exchange_third_party_invite/" +
|
||||||
|
url.PathEscape(builder.RoomID)
|
||||||
|
req := NewFederationRequest("PUT", s, path)
|
||||||
|
if err = req.SetContent(builder); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = ac.doRequest(req, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// LookupState retrieves the room state for a room at an event from a
|
// LookupState retrieves the room state for a room at an event from a
|
||||||
// remote matrix server as full matrix events.
|
// remote matrix server as full matrix events.
|
||||||
func (ac *FederationClient) LookupState(s ServerName, roomID, eventID string) (res RespState, err error) {
|
func (ac *FederationClient) LookupState(s ServerName, roomID, eventID string) (res RespState, err error) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ set -eu
|
||||||
|
|
||||||
echo "Installing lint search engine..."
|
echo "Installing lint search engine..."
|
||||||
go get github.com/alecthomas/gometalinter/
|
go get github.com/alecthomas/gometalinter/
|
||||||
gometalinter --config=linter.json --install
|
gometalinter --config=linter.json --install --update
|
||||||
|
|
||||||
echo "Looking for lint..."
|
echo "Looking for lint..."
|
||||||
gometalinter --config=linter.json
|
gometalinter --config=linter.json
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ func LookupServer(serverName ServerName) (*DNSResult, error) { // nolint: gocycl
|
||||||
result.Hosts = map[string]HostResult{}
|
result.Hosts = map[string]HostResult{}
|
||||||
|
|
||||||
hosts := map[string][]net.SRV{}
|
hosts := map[string][]net.SRV{}
|
||||||
if strings.Contains(string(serverName), ":") {
|
if !strings.Contains(string(serverName), ":") {
|
||||||
// If there isn't an explicit port set then try to look up the SRV record.
|
// If there isn't an explicit port set then try to look up the SRV record.
|
||||||
var err error
|
var err error
|
||||||
result.SRVCName, result.SRVRecords, err = net.LookupSRV("matrix", "tcp", string(serverName))
|
result.SRVCName, result.SRVRecords, err = net.LookupSRV("matrix", "tcp", string(serverName))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue