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

Function getForumThread

desktop/src/shared/api/forum.ts:118–140  ·  view source on GitHub ↗
(
  channelId: string,
  eventId: string,
  limit?: number,
  cursor?: string,
)

Source from the content-addressed store, hash-verified

116}
117
118export async function getForumThread(
119 channelId: string,
120 eventId: string,
121 limit?: number,
122 cursor?: string,
123): Promise<ForumThreadResponse> {
124 const response = await invokeTauri<RawForumThreadResponse>(
125 "get_forum_thread",
126 {
127 channelId,
128 eventId,
129 limit: limit ?? null,
130 cursor: cursor ?? null,
131 },
132 );
133
134 return {
135 post: fromRawForumPost(response.root),
136 replies: response.replies.map(fromRawThreadReply),
137 totalReplies: response.total_replies,
138 nextCursor: response.next_cursor,
139 };
140}

Callers 1

useForumThreadQueryFunction · 0.90

Calls 1

fromRawForumPostFunction · 0.85

Tested by

no test coverage detected