Update comments

This commit is contained in:
Neil Alexander 2020-05-26 11:45:31 +01:00
parent 33600277ea
commit 19615cc730

View file

@ -121,10 +121,11 @@ func (r *RoomserverInternalAPI) performJoinRoomByID(
return fmt.Errorf("eb.SetContent: %w", err) return fmt.Errorf("eb.SetContent: %w", err)
} }
// First work out if this is in response to an existing invite. // First work out if this is in response to an existing invite
// If it is then we avoid the situation where we might think we // from a federated server. If it is then we avoid the situation
// know about a room in the following section but don't know the // where we might think we know about a room in the following
// latest state as all of our users have left. // section but don't know the latest state as all of our users
// have left.
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 {
// Check if there's an invite pending. // Check if there's an invite pending.
@ -134,7 +135,7 @@ func (r *RoomserverInternalAPI) performJoinRoomByID(
} }
// Check that the domain isn't ours. If it's local then we don't // Check that the domain isn't ours. If it's local then we don't
// need to do anythig as our own copy of the room state will be // need to do anything as our own copy of the room state will be
// up-to-date. // up-to-date.
if inviterDomain != r.Cfg.Matrix.ServerName { if inviterDomain != r.Cfg.Matrix.ServerName {
// Add the server of the person who invited us to the server list, // Add the server of the person who invited us to the server list,