From 9e7ada605ec2ecb0c8469342dd3628a7b2ab4c49 Mon Sep 17 00:00:00 2001 From: Keep Creating Online Date: Sun, 2 Feb 2025 20:56:58 -0500 Subject: [PATCH] update --- .../iframe-content-appeals-form.html | 39 +++++++------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/components/iframe_forms/iframe-content-appeals-form.html b/src/components/iframe_forms/iframe-content-appeals-form.html index 0ba6778..7e095d3 100644 --- a/src/components/iframe_forms/iframe-content-appeals-form.html +++ b/src/components/iframe_forms/iframe-content-appeals-form.html @@ -14,7 +14,6 @@ color: #fff; font-family: system-ui, -apple-system, sans-serif; margin: 20px; - /* Removed max-width */ } /* Override the .container to use the full available width */ @@ -130,10 +129,8 @@ decisions will be communicated back to you.

+

1. User Information

- - - @@ -216,30 +213,25 @@ log("NostrTools not loaded. Check console or ad-blockers.", "error"); return; } - const { - generateSecretKey, - getPublicKey, - finalizeEvent, - nip04, - nip19, - SimplePool, - Relay, - } = window.NostrTools; + const { generateSecretKey, getPublicKey, finalizeEvent, nip04, nip19, SimplePool, Relay } = window.NostrTools; + + // Set the recipient's NPUB (your personal NPUB) here. + const recipientNpub = "npub13yarr7j6vjqjjkahd63dmr27curypehx45ucue286ac7sft27y0srnpmpe"; + const RELAYS = [ "wss://relay.snort.social", "wss://relay.damus.io", - "wss://relay.primal.net", + "wss://relay.primal.net" ]; const pool = new SimplePool(); + document.getElementById("dm-form").addEventListener("submit", async (ev) => { ev.preventDefault(); clear(); try { - // Retrieve user input. - const npub = document.getElementById("npubInput").value.trim(); - if (!npub.startsWith("npub")) { - throw new Error("Target must start with npub."); - } + // Note: The customer's NPUB input is removed. + // Use the recipientNpub constant to get the public key. + const contactMethod = document.getElementById("contactMethod").value.trim(); const videoTitle = document.getElementById("videoTitle").value.trim(); const magnetLink = document.getElementById("magnetLink").value.trim(); @@ -259,7 +251,6 @@ # **bitvid Content Appeals Form** **1. User Information** -- **Nostr Public Key (npub):** ${npub} - **Contact Method:** ${contactMethod || "N/A"} **2. Content Details** @@ -303,15 +294,15 @@ For further questions, reach out through bitvid’s Nostr support channels. log("[DEBUG] Constructed appeal content:\n" + appealContent); - // Decode the target npub to get the public key. - log("Decoding target npub..."); - const decoded = nip19.decode(npub); + // Decode the recipient NPUB to get the public key. + log("Decoding recipient npub..."); + const decoded = nip19.decode(recipientNpub); log("[DEBUG] Decoded npub: " + JSON.stringify(decoded)); if (decoded.type !== "npub") { throw new Error("Decoded type is not npub."); } const targetPubHex = decoded.data; - log("Target pubkey: " + targetPubHex.slice(0, 16) + "..."); + log("Recipient pubkey: " + targetPubHex.slice(0, 16) + "..."); // Generate an ephemeral key pair. log("Generating ephemeral key...");