easaiIT / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
0 stars 0 forks source link

Add exportChatHistory method to Chat class #3

Open sweep-ai[bot] opened 1 year ago

sweep-ai[bot] commented 1 year ago

Description

This PR adds a new method exportChatHistory to the Chat class in order to allow users to export the history of a selected conversation. The method retrieves all messages from the chat history using the existing fetchMessages method and formats them into a user-friendly format such as JSON or CSV. It also creates a downloadable file with the formatted chat history.

Summary of Changes

Fixes #1.

To checkout this PR branch, run the following command in your terminal:

git checkout sweep/feature/export-chat-history