Revert external content share back to kind 1 with i tag

Kind 16 requires an e tag pointing to a Nostr event ID, which external
content doesn't have. Kind 1 with an i tag is the correct approach.
This commit is contained in:
Chad Curtis
2026-02-28 21:23:48 -06:00
parent 1f18b978ce
commit 1bcfdc1457
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ export function useExternalRepostStatus(content: ExternalContent | null | undefi
const events = await nostr.query(
[{
kinds: [16],
kinds: [1],
authors: [user.pubkey],
'#i': [identifier],
limit: 1,
+3 -4
View File
@@ -117,20 +117,19 @@ function ExternalActionBar({ content }: { content: ExternalContent }) {
);
}, [user, content, identifier, publishEvent, queryClient, toast]);
// Publish kind 16 generic repost with i tag
// Publish kind 1 note sharing the external content via i tag
const handleShare = useCallback(() => {
if (!user) return;
queryClient.setQueryData(['external-user-repost', identifier], 'optimistic');
publishEvent(
{
kind: 16,
content: '',
kind: 1,
content: identifier,
created_at: Math.floor(Date.now() / 1000),
tags: [
['i', identifier],
['k', getExternalKTag(content)],
['alt', `Repost of ${identifier}`],
],
},
{