-
-
Notifications
You must be signed in to change notification settings - Fork 678
Conversation
return nil, nil | ||
// Use federation to auth the event | ||
var remoteServer gomatrixserverlib.ServerName | ||
_, remoteServer, err = gomatrixserverlib.SplitID('!', inv.RoomID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think synapse also falls back to the server who sent the "m.room.third_party_invite" by using the user ID of the sender of the invite, or am I imagining things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it first checks on the sender's server and then the room's server. Fixed in 0e356e2
return nil, nil | ||
// Use federation to auth the event | ||
var remoteServers []gomatrixserverlib.ServerName | ||
_, remoteServers[0], err = gomatrixserverlib.SplitID('@', inv.Sender) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will have problems because the remoteServers slice will have length 0.
remoteServers := make([]gomatrixserverlib.ServerName, 2)
might be better here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Fixed in ebe91ac
continue | ||
} | ||
|
||
err = federation.ExchangeThirdPartyInvite(server, *builder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is an error you may want to continue and try the next server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e1c8861
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Follows matrix-org/gomatrixserverlib#61
This PR address the case where the server receives a 3PID invite from an identity server for a room it's not in. It will then send to the room's server all the necessary data for building a
m.room.member
event so the room's server can authenticate it.