snort/packages/app/src/Components/Event/Thread/util.ts

10 lines
284 B
TypeScript
Raw Normal View History

2024-02-27 15:01:39 +00:00
import { TaggedNostrEvent, u256 } from "@snort/system";
export function getReplies(from: u256, chains?: Map<u256, Array<TaggedNostrEvent>>): Array<TaggedNostrEvent> {
if (!from || !chains) {
return [];
}
const replies = chains.get(from);
return replies ? replies : [];
}