(channelId, limit = 200)
| 44 | } |
| 45 | |
| 46 | export async function getConversationMessages(channelId, limit = 200) { |
| 47 | const params = new URLSearchParams({ limit: String(limit) }); |
| 48 | const res = await fetch( |
| 49 | state.API_BASE + `/api/conversations/${encodeURIComponent(channelId)}/messages?${params.toString()}`, |
| 50 | ); |
| 51 | if (!res.ok) { |
| 52 | throw new Error("Load Conversation Messages Failed"); |
| 53 | } |
| 54 | return await res.json(); |
| 55 | } |
no outgoing calls
no test coverage detected