1
0
forked from Kieran/snort

don't close publish modal automatically.

even if all relays responded with an OK the modal will still remain open so the
user can look at the list of relays the note was published to.
This commit is contained in:
fiatjaf 2023-10-16 10:20:29 -03:00 committed by Kieran
parent 227b3b8dd7
commit 7129ffa1c7
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -42,15 +42,8 @@ export function NoteBroadcaster({
}
}
async function sendNote() {
const results = await Promise.all(evs.map(a => sendEventToRelays(a)).flat());
if (results.flat().every(a => a.ok)) {
onClose();
}
}
useEffect(() => {
sendNote().catch(console.error);
Promise.all(evs.map(a => sendEventToRelays(a)).flat()).catch(console.error);
}, []);
async function removeRelayFromResult(r: OkResponse) {