MCPcopy Create free account
hub / github.com/block/buzz / buildChannelHistoryFilter

Function buildChannelHistoryFilter

desktop/src/shared/api/relayChannelFilters.ts:52–68  ·  view source on GitHub ↗
(
  channelId: string,
  limit: number,
  until?: number,
)

Source from the content-addressed store, hash-verified

50 * broad {@link CHANNEL_EVENT_KINDS} set).
51 */
52export function buildChannelHistoryFilter(
53 channelId: string,
54 limit: number,
55 until?: number,
56): RelaySubscriptionFilter {
57 const filter: RelaySubscriptionFilter = {
58 kinds: [...CHANNEL_TIMELINE_CONTENT_KINDS],
59 "#h": [channelId],
60 limit,
61 };
62
63 if (until !== undefined) {
64 filter.until = until;
65 }
66
67 return filter;
68}
69
70/**
71 * Aux-backfill filter for one chunk of loaded message ids: pulls auxiliary

Callers 2

fetchChannelHistoryMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected