mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 23:48:27 +00:00
Speed up accepting invites from remote users if we're already in the room (#1349)
This commit is contained in:
parent
7466e6b718
commit
034e5d5a55
1 changed files with 2 additions and 1 deletions
|
@ -161,8 +161,9 @@ func (r *RoomserverInternalAPI) performJoinRoomByID(
|
||||||
// where we might think we know about a room in the following
|
// where we might think we know about a room in the following
|
||||||
// section but don't know the latest state as all of our users
|
// section but don't know the latest state as all of our users
|
||||||
// have left.
|
// have left.
|
||||||
|
serverInRoom, _ := r.isServerCurrentlyInRoom(ctx, r.ServerName, req.RoomIDOrAlias)
|
||||||
isInvitePending, inviteSender, _, err := r.isInvitePending(ctx, req.RoomIDOrAlias, req.UserID)
|
isInvitePending, inviteSender, _, err := r.isInvitePending(ctx, req.RoomIDOrAlias, req.UserID)
|
||||||
if err == nil && isInvitePending {
|
if err == nil && isInvitePending && !serverInRoom {
|
||||||
// Check if there's an invite pending.
|
// Check if there's an invite pending.
|
||||||
_, inviterDomain, ierr := gomatrixserverlib.SplitID('@', inviteSender)
|
_, inviterDomain, ierr := gomatrixserverlib.SplitID('@', inviteSender)
|
||||||
if ierr != nil {
|
if ierr != nil {
|
||||||
|
|
Loading…
Reference in a new issue