add trending notes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { MentionUser } from "@app/space/components/notes/mentions/user";
|
||||
import { MentionUser } from "@shared/notes/mentions/user";
|
||||
import destr from "destr";
|
||||
import getUrls from "get-urls";
|
||||
import { parseReferences } from "nostr-tools";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { NDKTag } from "@nostr-dev-kit/ndk";
|
||||
import destr from "destr";
|
||||
import { nip19 } from "nostr-tools";
|
||||
|
||||
@@ -66,7 +67,7 @@ export function getParentID(arr: string[], fallback: string) {
|
||||
}
|
||||
|
||||
// check id present in event tags
|
||||
export function isTagsIncludeID(id: string, arr: string[]) {
|
||||
export function isTagsIncludeID(id: string, arr: NDKTag[]) {
|
||||
const tags = destr(arr);
|
||||
|
||||
if (tags.length > 0) {
|
||||
@@ -79,7 +80,7 @@ export function isTagsIncludeID(id: string, arr: string[]) {
|
||||
}
|
||||
|
||||
// get parent id from event tags
|
||||
export function getQuoteID(arr: string[]) {
|
||||
export function getQuoteID(arr: NDKTag[]) {
|
||||
const tags = destr(arr);
|
||||
let quoteID = null;
|
||||
|
||||
|
||||
6
src/utils/types.ts
Normal file
6
src/utils/types.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { NDKEvent } from "@nostr-dev-kit/ndk";
|
||||
|
||||
export interface LumeEvent extends NDKEvent {
|
||||
event_id: string;
|
||||
parent_id: string;
|
||||
}
|
||||
Reference in New Issue
Block a user