feat: explore (#85)
This commit is contained in:
@@ -4,6 +4,7 @@ import { createCommentDraftEvent, createShortTextNoteDraftEvent } from '@/lib/dr
|
||||
import { useFeed } from '@/providers/FeedProvider.tsx'
|
||||
import { useNostr } from '@/providers/NostrProvider'
|
||||
import client from '@/services/client.service'
|
||||
import relayInfoService from '@/services/relay-info.service'
|
||||
import { ChevronDown, ImageUp, LoaderCircle } from 'lucide-react'
|
||||
import { Event, kinds } from 'nostr-tools'
|
||||
import { useState } from 'react'
|
||||
@@ -54,7 +55,7 @@ export default function NormalPostContent({
|
||||
}
|
||||
let protectedEvent = false
|
||||
if (postOptions.sendOnlyToCurrentRelays) {
|
||||
const relayInfos = await client.fetchRelayInfos(relayUrls)
|
||||
const relayInfos = await relayInfoService.getRelayInfos(relayUrls)
|
||||
protectedEvent = relayInfos.every((info) => info?.supported_nips?.includes(70))
|
||||
}
|
||||
const draftEvent =
|
||||
|
||||
@@ -4,7 +4,7 @@ import { createPictureNoteDraftEvent } from '@/lib/draft-event'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useFeed } from '@/providers/FeedProvider.tsx'
|
||||
import { useNostr } from '@/providers/NostrProvider'
|
||||
import client from '@/services/client.service'
|
||||
import relayInfoService from '@/services/relay-info.service'
|
||||
import { ChevronDown, Loader, LoaderCircle, Plus, X } from 'lucide-react'
|
||||
import { Dispatch, SetStateAction, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@@ -43,7 +43,7 @@ export default function PicturePostContent({ close }: { close: () => void }) {
|
||||
}
|
||||
let protectedEvent = false
|
||||
if (postOptions.sendOnlyToCurrentRelays) {
|
||||
const relayInfos = await client.fetchRelayInfos(relayUrls)
|
||||
const relayInfos = await relayInfoService.getRelayInfos(relayUrls)
|
||||
protectedEvent = relayInfos.every((info) => info?.supported_nips?.includes(70))
|
||||
}
|
||||
const draftEvent = await createPictureNoteDraftEvent(content, pictureInfos, {
|
||||
|
||||
Reference in New Issue
Block a user