feat: adjust target relays for reviews

This commit is contained in:
codytseng
2025-09-30 15:36:36 +08:00
parent 98c6555ba5
commit bdeee4ec31
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { Textarea } from '@/components/ui/textarea' import { Textarea } from '@/components/ui/textarea'
import { BIG_RELAY_URLS } from '@/constants'
import { createRelayReviewDraftEvent } from '@/lib/draft-event' import { createRelayReviewDraftEvent } from '@/lib/draft-event'
import { useNostr } from '@/providers/NostrProvider' import { useNostr } from '@/providers/NostrProvider'
import { Loader2, Star } from 'lucide-react' import { Loader2, Star } from 'lucide-react'
@@ -30,7 +29,7 @@ export default function ReviewEditor({
setSubmitting(true) setSubmitting(true)
try { try {
const draftEvent = createRelayReviewDraftEvent(relayUrl, review, stars) const draftEvent = createRelayReviewDraftEvent(relayUrl, review, stars)
const evt = await publish(draftEvent, { specifiedRelayUrls: [relayUrl, ...BIG_RELAY_URLS] }) const evt = await publish(draftEvent)
onReviewed(evt) onReviewed(evt)
} catch (error) { } catch (error) {
if (error instanceof AggregateError) { if (error instanceof AggregateError) {

View File

@@ -123,7 +123,8 @@ class ClientService extends EventTarget {
kinds.RelayList, kinds.RelayList,
kinds.Contacts, kinds.Contacts,
ExtendedKind.FAVORITE_RELAYS, ExtendedKind.FAVORITE_RELAYS,
ExtendedKind.BLOSSOM_SERVER_LIST ExtendedKind.BLOSSOM_SERVER_LIST,
ExtendedKind.RELAY_REVIEW
].includes(event.kind) ].includes(event.kind)
) { ) {
_additionalRelayUrls.push(...BIG_RELAY_URLS) _additionalRelayUrls.push(...BIG_RELAY_URLS)