mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-20 13:01:07 +02:00
Fix subscription id too long
This commit is contained in:
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 moment from "moment";
|
||||||
import { Note } from "../../components/note";
|
import { Note } from "../../components/note";
|
||||||
import { useTimelineLoader } from "../../hooks/use-timeline-loader";
|
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 { useAppTitle } from "../../hooks/use-app-title";
|
||||||
import { useReadRelayUrls } from "../../hooks/use-client-relays";
|
import { useReadRelayUrls } from "../../hooks/use-client-relays";
|
||||||
import { useCurrentAccount } from "../../hooks/use-current-account";
|
import { useCurrentAccount } from "../../hooks/use-current-account";
|
||||||
@@ -69,7 +69,7 @@ export default function DiscoverTab() {
|
|||||||
const throttledPubkeys = useThrottle(pubkeys, 1000);
|
const throttledPubkeys = useThrottle(pubkeys, 1000);
|
||||||
|
|
||||||
const { events, loading, loadMore } = useTimelineLoader(
|
const { events, loading, loadMore } = useTimelineLoader(
|
||||||
`${account.pubkey}-discover`,
|
`${truncatedId(account.pubkey)}-discover`,
|
||||||
relays,
|
relays,
|
||||||
{ authors: throttledPubkeys, kinds: [1], since: moment().subtract(1, "hour").unix() },
|
{ authors: throttledPubkeys, kinds: [1], since: moment().subtract(1, "hour").unix() },
|
||||||
{ pageSize: moment.duration(1, "hour").asSeconds(), enabled: throttledPubkeys.length > 0 }
|
{ 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 { useSearchParams } from "react-router-dom";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { Note } from "../../components/note";
|
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 { useTimelineLoader } from "../../hooks/use-timeline-loader";
|
||||||
import { useUserContacts } from "../../hooks/use-user-contacts";
|
import { useUserContacts } from "../../hooks/use-user-contacts";
|
||||||
import { AddIcon } from "@chakra-ui/icons";
|
import { AddIcon } from "@chakra-ui/icons";
|
||||||
@@ -25,7 +25,7 @@ export default function FollowingTab() {
|
|||||||
|
|
||||||
const following = contacts?.contacts || [];
|
const following = contacts?.contacts || [];
|
||||||
const { events, loading, loadMore } = useTimelineLoader(
|
const { events, loading, loadMore } = useTimelineLoader(
|
||||||
`${account.pubkey}-following-posts`,
|
`${truncatedId(account.pubkey)}-following-posts`,
|
||||||
readRelays,
|
readRelays,
|
||||||
{ authors: following, kinds: [1, 6], since: moment().subtract(2, "hour").unix() },
|
{ authors: following, kinds: [1, 6], since: moment().subtract(2, "hour").unix() },
|
||||||
{ pageSize: moment.duration(2, "hour").asSeconds(), enabled: following.length > 0 }
|
{ pageSize: moment.duration(2, "hour").asSeconds(), enabled: following.length > 0 }
|
||||||
|
Reference in New Issue
Block a user