feat: support sending only to current relays

This commit is contained in:
codytseng 2025-02-05 15:18:58 +08:00
parent 29f5ccc4bb
commit ccf8c21954
11 changed files with 199 additions and 75 deletions

View file

@ -64,7 +64,7 @@ export default function RepostButton({
const targetRelayList = await client.fetchRelayList(event.pubkey)
const repost = createRepostDraftEvent(event)
await publish(repost, targetRelayList.read.slice(0, 5))
await publish(repost, { additionalRelayUrls: targetRelayList.read.slice(0, 5) })
markNoteAsReposted(event.id)
} catch (error) {
console.error('repost failed', error)