mirror of
https://github.com/openai/codex.git
synced 2026-09-15 12:08:01 +00:00
reload config before sending notif
This commit is contained in:
@@ -874,17 +874,6 @@ impl CodexMessageProcessor {
|
||||
}
|
||||
};
|
||||
|
||||
let payload = LoginChatGptCompleteNotification {
|
||||
login_id,
|
||||
success,
|
||||
error: error_msg.clone(),
|
||||
};
|
||||
outgoing_clone
|
||||
.send_server_notification(ServerNotification::LoginChatGptComplete(
|
||||
payload,
|
||||
))
|
||||
.await;
|
||||
|
||||
if success {
|
||||
auth_manager.reload();
|
||||
replace_cloud_requirements_loader(
|
||||
@@ -892,6 +881,18 @@ impl CodexMessageProcessor {
|
||||
auth_manager.clone(),
|
||||
chatgpt_base_url,
|
||||
);
|
||||
|
||||
let payload = LoginChatGptCompleteNotification {
|
||||
login_id,
|
||||
success: true,
|
||||
error: None,
|
||||
};
|
||||
outgoing_clone
|
||||
.send_server_notification(ServerNotification::LoginChatGptComplete(
|
||||
payload,
|
||||
))
|
||||
.await;
|
||||
|
||||
sync_default_client_residency_requirement(
|
||||
&cli_overrides,
|
||||
cloud_requirements.as_ref(),
|
||||
@@ -911,6 +912,17 @@ impl CodexMessageProcessor {
|
||||
payload,
|
||||
))
|
||||
.await;
|
||||
} else {
|
||||
let payload = LoginChatGptCompleteNotification {
|
||||
login_id,
|
||||
success: false,
|
||||
error: error_msg,
|
||||
};
|
||||
outgoing_clone
|
||||
.send_server_notification(ServerNotification::LoginChatGptComplete(
|
||||
payload,
|
||||
))
|
||||
.await;
|
||||
}
|
||||
|
||||
// Clear the active login if it matches this attempt. It may have been replaced or cancelled.
|
||||
@@ -980,17 +992,6 @@ impl CodexMessageProcessor {
|
||||
}
|
||||
};
|
||||
|
||||
let payload_v2 = AccountLoginCompletedNotification {
|
||||
login_id: Some(login_id.to_string()),
|
||||
success,
|
||||
error: error_msg,
|
||||
};
|
||||
outgoing_clone
|
||||
.send_server_notification(ServerNotification::AccountLoginCompleted(
|
||||
payload_v2,
|
||||
))
|
||||
.await;
|
||||
|
||||
if success {
|
||||
auth_manager.reload();
|
||||
replace_cloud_requirements_loader(
|
||||
@@ -998,6 +999,18 @@ impl CodexMessageProcessor {
|
||||
auth_manager.clone(),
|
||||
chatgpt_base_url,
|
||||
);
|
||||
|
||||
let payload_v2 = AccountLoginCompletedNotification {
|
||||
login_id: Some(login_id.to_string()),
|
||||
success: true,
|
||||
error: None,
|
||||
};
|
||||
outgoing_clone
|
||||
.send_server_notification(
|
||||
ServerNotification::AccountLoginCompleted(payload_v2),
|
||||
)
|
||||
.await;
|
||||
|
||||
sync_default_client_residency_requirement(
|
||||
&cli_overrides,
|
||||
cloud_requirements.as_ref(),
|
||||
@@ -1017,6 +1030,17 @@ impl CodexMessageProcessor {
|
||||
payload_v2,
|
||||
))
|
||||
.await;
|
||||
} else {
|
||||
let payload_v2 = AccountLoginCompletedNotification {
|
||||
login_id: Some(login_id.to_string()),
|
||||
success: false,
|
||||
error: error_msg,
|
||||
};
|
||||
outgoing_clone
|
||||
.send_server_notification(
|
||||
ServerNotification::AccountLoginCompleted(payload_v2),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
// Clear the active login if it matches this attempt. It may have been replaced or cancelled.
|
||||
|
||||
Reference in New Issue
Block a user