Don't perform a federated join after invite if we are already joined to the room (#2762)
If we are already joined to the room then it shouldn't matter if you were invited or not, so this looks like a bug.
This commit is contained in:
parent
3da182212e
commit
ae10aac456
|
@ -237,7 +237,7 @@ func (r *Joiner) performJoinRoomByID(
|
||||||
// Force a federated join if we're dealing with a pending invite
|
// Force a federated join if we're dealing with a pending invite
|
||||||
// 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 && !serverInRoom && isInvitePending {
|
||||||
_, 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)
|
||||||
|
|
Loading…
Reference in a new issue