Fix repo announcement event structure

This commit is contained in:
DanConwayDev committed 2025-10-30 15:11:47 +00:00
1 parent 18456f2293
commit 430806fbf9
5 files changed
+159 -21

No files matched your search

+21 -12
View File
@@ -194,20 +194,29 @@ export function AnnounceRepositoryDialog({
tags.push(['description', description.trim()]);
}
// Add web URLs
webUrls.forEach(url => {
if (url.trim()) tags.push(['web', url.trim()]);
});
// Add web URLs (all in a single tag per NIP-34)
if (webUrls.length > 0) {
const trimmedUrls = webUrls.map(url => url.trim()).filter(url => url);
if (trimmedUrls.length > 0) {
tags.push(['web', ...trimmedUrls]);
}
}
// Add clone URLs (required)
cloneUrls.forEach(url => {
if (url.trim()) tags.push(['clone', url.trim()]);
});
// Add clone URLs (required, all in a single tag per NIP-34)
if (cloneUrls.length > 0) {
const trimmedUrls = cloneUrls.map(url => url.trim()).filter(url => url);
if (trimmedUrls.length > 0) {
tags.push(['clone', ...trimmedUrls]);
}
}
// Add relays for patch submissions
relays.forEach(relay => {
if (relay.trim()) tags.push(['relays', relay.trim()]);
});
// Add relays for patch submissions (all in a single tag per NIP-34)
if (relays.length > 0) {
const trimmedRelays = relays.map(relay => relay.trim()).filter(relay => relay);
if (trimmedRelays.length > 0) {
tags.push(['relays', ...trimmedRelays]);
}
}
// Add earliest unique commit (euc) for repository identification
if (earliestCommit.trim()) {