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

Function handleGetNotesTimeline

desktop/src/testing/e2eBridge.ts:4100–4110  ·  view source on GitHub ↗
(args: {
  pubkeys?: string[];
  limitPerUser?: number | null;
})

Source from the content-addressed store, hash-verified

4098}
4099
4100function handleGetNotesTimeline(args: {
4101 pubkeys?: string[];
4102 limitPerUser?: number | null;
4103}) {
4104 const pubkeys = args.pubkeys ?? [];
4105 const limitPerUser = args.limitPerUser ?? 10;
4106 const notes = pubkeys
4107 .flatMap((pubkey) => getMockUserNotes(pubkey).slice(0, limitPerUser))
4108 .sort((left, right) => right.created_at - left.created_at);
4109 return { notes, next_cursor: null };
4110}
4111
4112function handleGetNote(args: { noteId?: string }) {
4113 const noteId = args.noteId;

Callers 1

handleMockCommandFunction · 0.85

Calls 1

getMockUserNotesFunction · 0.85

Tested by

no test coverage detected