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, projectId,
); );
if (result.success) { if (result.success) {
const providerName = providerId === "ntfy" const successMessage = providerId === "ntfy"
? "ntfy app" ? "Test notification sent — check your ntfy app!"
: providerId === "ntfy-message" || providerId === "ntfy-room" : providerId === "ntfy-message"
? "ntfy app inbox" ? "Direct-message test sent — check your ntfy inbox for the agent-to-user message."
: "webhook endpoint"; : providerId === "ntfy-room"
const successMessage = `Test notification sent — check your ${providerName}!`; ? "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 } })); setTestNotificationResult((prev) => ({ ...prev, [providerId]: { status: "success", message: successMessage } }));
addToast(successMessage, "success"); addToast(successMessage, "success");
} else { } 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 } })); setTestNotificationResult((prev) => ({ ...prev, [providerId]: { status: "error", message: failureMessage } }));
addToast(failureMessage, "error"); addToast(failureMessage, "error");
} }