mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Signed-off-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1cc3ha7z055mu0rwwu7806t2wt8mj3pvu0uv5mfp2c50dahaqhczshdalg6 <c6237ef84fa537c78dcee78efd2d4e59f728859c7f194da42ac51ededfa0be05@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
18 lines
557 B
TypeScript
18 lines
557 B
TypeScript
import { invokeTauri } from "@/shared/api/tauri";
|
|
import type { ChannelPageCursor, RelayEvent } from "@/shared/api/types";
|
|
|
|
/** Fetch the flat Nostr event array for one server-assembled channel window. */
|
|
export async function getChannelWindowEvents(
|
|
channelId: string,
|
|
cursor: ChannelPageCursor | null = null,
|
|
limitRows = 50,
|
|
): Promise<RelayEvent[]> {
|
|
return invokeTauri<RelayEvent[]>("get_channel_window", {
|
|
channelId,
|
|
limitRows,
|
|
cursor: cursor
|
|
? { created_at: cursor.createdAt, event_id: cursor.eventId }
|
|
: null,
|
|
});
|
|
}
|