refactor: don't use length for req id
This commit is contained in:
@ -44,9 +44,7 @@ export function useBadges(pubkey: string, leaveOpen = true) {
|
|||||||
|
|
||||||
const acceptedSub = useMemo(() => {
|
const acceptedSub = useMemo(() => {
|
||||||
if (rawBadges.length === 0) return null;
|
if (rawBadges.length === 0) return null;
|
||||||
const rb = new RequestBuilder(
|
const rb = new RequestBuilder(`accepted-badges:${pubkey.slice(0, 12)}`);
|
||||||
`accepted-badges:${pubkey.slice(0, 12)}:${rawBadges.length}`,
|
|
||||||
);
|
|
||||||
rb.withFilter()
|
rb.withFilter()
|
||||||
.kinds([EventKind.ProfileBadges])
|
.kinds([EventKind.ProfileBadges])
|
||||||
.tag("d", ["profile_badges"])
|
.tag("d", ["profile_badges"])
|
||||||
|
@ -42,9 +42,7 @@ export function useLiveChatFeed(link: NostrLink, eZaps?: Array<string>) {
|
|||||||
|
|
||||||
const esub = useMemo(() => {
|
const esub = useMemo(() => {
|
||||||
if (etags.length === 0) return null;
|
if (etags.length === 0) return null;
|
||||||
const rb = new RequestBuilder(
|
const rb = new RequestBuilder(`reactions:${link.id}:${link.author}`);
|
||||||
`reactions:${link.id}:${link.author}:${etags.length}`,
|
|
||||||
);
|
|
||||||
rb.withOptions({
|
rb.withOptions({
|
||||||
leaveOpen: true,
|
leaveOpen: true,
|
||||||
});
|
});
|
||||||
|
@ -7,9 +7,10 @@ import { unixNow } from "@snort/shared";
|
|||||||
import { LIVE_STREAM } from "const";
|
import { LIVE_STREAM } from "const";
|
||||||
import { System, StreamState } from "index";
|
import { System, StreamState } from "index";
|
||||||
import { findTag } from "utils";
|
import { findTag } from "utils";
|
||||||
|
import { WEEK } from "const";
|
||||||
|
|
||||||
export function useStreamsFeed(tag?: string) {
|
export function useStreamsFeed(tag?: string) {
|
||||||
const since = useMemo(() => unixNow() - 86400, [tag]);
|
const since = useMemo(() => unixNow() - WEEK, [tag]);
|
||||||
const rb = useMemo(() => {
|
const rb = useMemo(() => {
|
||||||
const rb = new RequestBuilder(tag ? `streams:${tag}` : "streams");
|
const rb = new RequestBuilder(tag ? `streams:${tag}` : "streams");
|
||||||
rb.withOptions({
|
rb.withOptions({
|
||||||
|
Reference in New Issue
Block a user