deleteConversation static method

Future<bool> deleteConversation(
  1. bool isMarketplace,
  2. Conversation conversation
)

Implementation

static Future<bool> deleteConversation(
  bool isMarketplace,
  Conversation conversation,
) async {
  try {
    bool success = false;
    String url = ApiUrls.conversationUrl(
      conversation.assistantId,
      conversation.id,
      isMarketplace: isMarketplace,
    );
    await ApiService.call(
      url,
      RequestType.delete,
      onSuccess: (response) => success = true,
    );
    return success;
  } catch (e) {
    return false;
  }
}