fix(server-party-co-managed): use session_started event for participants list
session_created event only contains initial co-managed parties, but session_started event contains ALL participants including external parties that joined dynamically via invite code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
2164664ca0
commit
290b5ea766
|
|
@ -416,11 +416,13 @@ func createCoManagedSessionEventHandler(
|
||||||
zap.String("session_id", event.SessionId),
|
zap.String("session_id", event.SessionId),
|
||||||
zap.String("party_id", partyID))
|
zap.String("party_id", partyID))
|
||||||
|
|
||||||
// Build SessionInfo from pending session and event data
|
// Build SessionInfo from session_started event (NOT from pendingSession cache)
|
||||||
|
// session_started event contains ALL participants who have joined,
|
||||||
|
// including external parties that joined dynamically after session_created
|
||||||
// Note: We already called JoinSession in session_created phase,
|
// Note: We already called JoinSession in session_created phase,
|
||||||
// so we use ExecuteWithSessionInfo to skip the duplicate JoinSession call
|
// so we use ExecuteWithSessionInfo to skip the duplicate JoinSession call
|
||||||
participants := make([]use_cases.ParticipantInfo, len(pendingSession.SelectedParties))
|
participants := make([]use_cases.ParticipantInfo, len(event.SelectedParties))
|
||||||
for i, p := range pendingSession.SelectedParties {
|
for i, p := range event.SelectedParties {
|
||||||
participants[i] = use_cases.ParticipantInfo{
|
participants[i] = use_cases.ParticipantInfo{
|
||||||
PartyID: p,
|
PartyID: p,
|
||||||
PartyIndex: i,
|
PartyIndex: i,
|
||||||
|
|
@ -430,8 +432,8 @@ func createCoManagedSessionEventHandler(
|
||||||
sessionInfo := &use_cases.SessionInfo{
|
sessionInfo := &use_cases.SessionInfo{
|
||||||
SessionID: pendingSession.SessionID,
|
SessionID: pendingSession.SessionID,
|
||||||
SessionType: "co_managed_keygen",
|
SessionType: "co_managed_keygen",
|
||||||
ThresholdN: pendingSession.ThresholdN,
|
ThresholdN: int(event.ThresholdN),
|
||||||
ThresholdT: pendingSession.ThresholdT,
|
ThresholdT: int(event.ThresholdT),
|
||||||
MessageHash: pendingSession.MessageHash,
|
MessageHash: pendingSession.MessageHash,
|
||||||
Participants: participants,
|
Participants: participants,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue