feat(FN-4202): complete Step 1 — differentiate ntfy test result copy

Fusion-Task-Id: FN-4202
Fusion-Task-Lineage: 80626869-c2ef-4a57-ba94-e3fe37cfc2b8
This commit is contained in:
Fusion
2026-05-13 04:30:30 -07:00
committed by gsxdsm
parent 9c44bb0159
commit 5f383644b8

View File

@@ -1224,16 +1224,21 @@ export function SettingsModal({
projectId,
);
if (result.success) {
const providerName = providerId === "ntfy"
? "ntfy app"
: providerId === "ntfy-message" || providerId === "ntfy-room"
? "ntfy app inbox"
: "webhook endpoint";
const successMessage = `Test notification sent — check your ${providerName}!`;
const successMessage = providerId === "ntfy"
? "Test notification sent — check your ntfy app!"
: providerId === "ntfy-message"
? "Direct-message test sent — check your ntfy inbox for the agent-to-user message."
: providerId === "ntfy-room"
? "Room reply test sent — check your ntfy inbox for the room reply."
: "Test notification sent — check your webhook endpoint!";
setTestNotificationResult((prev) => ({ ...prev, [providerId]: { status: "success", message: successMessage } }));
addToast(successMessage, "success");
} else {
const failureMessage = "Failed to send test notification";
const failureMessage = providerId === "ntfy-message"
? "Failed to send direct-message test"
: providerId === "ntfy-room"
? "Failed to send room reply test"
: "Failed to send test notification";
setTestNotificationResult((prev) => ({ ...prev, [providerId]: { status: "error", message: failureMessage } }));
addToast(failureMessage, "error");
}