( channelId: string, eventId: string, limit?: number, cursor?: string, )
| 116 | } |
| 117 | |
| 118 | export 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 | } |
no test coverage detected