mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-10 12:49:29 +02:00
Fix subscription id too long
This commit is contained in:
parent
7fea7e0fbf
commit
0df1db85ae
5
.changeset/tidy-trains-tap.md
Normal file
5
.changeset/tidy-trains-tap.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"nostrudel": patch
|
||||
---
|
||||
|
||||
Fix subscription id too long
|
@ -3,7 +3,7 @@ import { Button, Flex, Spinner } from "@chakra-ui/react";
|
||||
import moment from "moment";
|
||||
import { Note } from "../../components/note";
|
||||
import { useTimelineLoader } from "../../hooks/use-timeline-loader";
|
||||
import { isReply } from "../../helpers/nostr-event";
|
||||
import { isReply, truncatedId } from "../../helpers/nostr-event";
|
||||
import { useAppTitle } from "../../hooks/use-app-title";
|
||||
import { useReadRelayUrls } from "../../hooks/use-client-relays";
|
||||
import { useCurrentAccount } from "../../hooks/use-current-account";
|
||||
@ -69,7 +69,7 @@ export default function DiscoverTab() {
|
||||
const throttledPubkeys = useThrottle(pubkeys, 1000);
|
||||
|
||||
const { events, loading, loadMore } = useTimelineLoader(
|
||||
`${account.pubkey}-discover`,
|
||||
`${truncatedId(account.pubkey)}-discover`,
|
||||
relays,
|
||||
{ authors: throttledPubkeys, kinds: [1], since: moment().subtract(1, "hour").unix() },
|
||||
{ pageSize: moment.duration(1, "hour").asSeconds(), enabled: throttledPubkeys.length > 0 }
|
||||
|
@ -2,7 +2,7 @@ import { Button, Flex, FormControl, FormLabel, Spinner, Switch } from "@chakra-u
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import moment from "moment";
|
||||
import { Note } from "../../components/note";
|
||||
import { isReply } from "../../helpers/nostr-event";
|
||||
import { isReply, truncatedId } from "../../helpers/nostr-event";
|
||||
import { useTimelineLoader } from "../../hooks/use-timeline-loader";
|
||||
import { useUserContacts } from "../../hooks/use-user-contacts";
|
||||
import { AddIcon } from "@chakra-ui/icons";
|
||||
@ -25,7 +25,7 @@ export default function FollowingTab() {
|
||||
|
||||
const following = contacts?.contacts || [];
|
||||
const { events, loading, loadMore } = useTimelineLoader(
|
||||
`${account.pubkey}-following-posts`,
|
||||
`${truncatedId(account.pubkey)}-following-posts`,
|
||||
readRelays,
|
||||
{ authors: following, kinds: [1, 6], since: moment().subtract(2, "hour").unix() },
|
||||
{ pageSize: moment.duration(2, "hour").asSeconds(), enabled: following.length > 0 }
|
||||
|
Loading…
x
Reference in New Issue
Block a user