's'
This commit is contained in:
@@ -79,3 +79,16 @@ export async function sendChatMessage(conversationId: string, body: string): Pro
|
||||
export async function markChatRead(conversationId: string): Promise<void> {
|
||||
await apiFetch(`/api/conversations/${conversationId}/read`, { method: "POST", body: JSON.stringify({}) });
|
||||
}
|
||||
|
||||
export async function startConversation(options: {
|
||||
profileId?: string;
|
||||
targetUserId?: string;
|
||||
intent?: string;
|
||||
opener?: string;
|
||||
}): Promise<ConversationItem> {
|
||||
const data = await apiFetch<{ conversation: ConversationItem }>("/api/conversations/start", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(options),
|
||||
});
|
||||
return data.conversation;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user