mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
Don't force federated join for possibly even local invites
This commit is contained in:
parent
36862bc436
commit
6881b6a6f1
|
|
@ -192,7 +192,6 @@ func (r *Joiner) performJoinRoomByID(
|
||||||
// and we aren't in the room.
|
// and we aren't in the room.
|
||||||
isInvitePending, inviteSender, _, err := helpers.IsInvitePending(ctx, r.DB, req.RoomIDOrAlias, req.UserID)
|
isInvitePending, inviteSender, _, err := helpers.IsInvitePending(ctx, r.DB, req.RoomIDOrAlias, req.UserID)
|
||||||
if err == nil && isInvitePending {
|
if err == nil && isInvitePending {
|
||||||
forceFederatedJoin = true
|
|
||||||
_, inviterDomain, ierr := gomatrixserverlib.SplitID('@', inviteSender)
|
_, inviterDomain, ierr := gomatrixserverlib.SplitID('@', inviteSender)
|
||||||
if ierr != nil {
|
if ierr != nil {
|
||||||
return "", fmt.Errorf("gomatrixserverlib.SplitID: %w", err)
|
return "", fmt.Errorf("gomatrixserverlib.SplitID: %w", err)
|
||||||
|
|
@ -202,6 +201,7 @@ func (r *Joiner) performJoinRoomByID(
|
||||||
// assume they are in the room so we can join via them.
|
// assume they are in the room so we can join via them.
|
||||||
if inviterDomain != r.Cfg.Matrix.ServerName {
|
if inviterDomain != r.Cfg.Matrix.ServerName {
|
||||||
req.ServerNames = append(req.ServerNames, inviterDomain)
|
req.ServerNames = append(req.ServerNames, inviterDomain)
|
||||||
|
forceFederatedJoin = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue