Placeholder comments for modifications needed to /send_join for power DAG

This commit is contained in:
Devon Hudson 2023-04-19 18:25:43 -06:00
parent a3b87f477c
commit 549d20cb61
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -312,6 +312,9 @@ func SendJoin(
}
}
// TODO: (PowerDAG) query state & power DAG
// We return the entire power DAG with a send_join response
// Fetch the state and auth chain. We do this before we send the events
// on, in case this fails.
var stateAndAuthChainResponse api.QueryStateAndAuthChainResponse
@ -339,6 +342,9 @@ func SendJoin(
}
}
// TODO: (Power DAG) will we have enough info in a join response to check membership?
// We should include the user membership event (if there is one) in the state response.
// Check if the user is already in the room. If they're already in then
// there isn't much point in sending another join event into the room.
// Also check to see if they are banned: if they are then we reject them.
@ -425,6 +431,8 @@ func SendJoin(
}
}
// TODO: (PowerDAG) Adapt this to return the full power DAG & state + user membership event (if it exists)
// sort events deterministically by depth (lower is earlier)
// We also do this because sytest's basic federation server isn't good at using the correct
// state if these lists are randomised, resulting in flakey tests. :(