more logic for getting conversation if it's not there but should be

This commit is contained in:
talksik
2022-06-11 12:40:17 -05:00
parent 298a989cd9
commit 10ac1626ab
5 changed files with 80 additions and 16 deletions
+6
View File
@@ -89,3 +89,9 @@ export async function getConversations(): Promise<NirvanaResponse<Conversation[]
export async function checkIfOnOnOneExists(otherUserId: string): Promise<NirvanaResponse<string>> {
return await NirvanaApi.fetch(`/conversations/check/${otherUserId}`, 'GET', true);
}
export async function getConversationById(
conversationId: string,
): Promise<NirvanaResponse<Conversation>> {
return await NirvanaApi.fetch(`/conversations/${conversationId}`, 'GET', true);
}