- Added 'bin' to .gitignore to exclude binary files from version control.
- Improved environment variable handling in root.go by normalizing variable names to lowercase.
- Added protocol message handling in webhook.go to manage message edits and revocations.
- Enhanced webhook forwarding logic to skip specific protocol messages.
- Updated go.mau.fi/whatsmeow to version v0.0.0-20250612124742-cc05d16b464b in go.mod and go.sum.
- Incremented application version to v6.0.3 in settings.go.
* fix: normalize lid addresses
* fix: parse lid properly in groups
* fix: swapped params
* fix: reuse ctx and better error handling
* fix: tags lid mapping
- Add /user/check endpoint with phone query parameter
- Implement CheckRequest and CheckResponse domain types
- Add IsOnWhatsApp method to user usecase interface and implementation
- Create AccountUserCheck Vue component for UI interaction
- Update OpenAPI documentation with new endpoint schema
- Bump version to 6.1.0 for new feature release
- update to v6.0.2
- enable foreign keys in SQLite database
- fix docker documentation example
- update dependencies including whatsmeow and mcp-go
- improve database URI flag documentation
This commit introduces a .dockerignore file to exclude unnecessary files from the Docker build context. Additionally, the Dockerfile is updated to set the default command to "rest" when the container starts, ensuring proper execution of the application.
refactor: centralize folder creation in root initialization
chore: bump version to v6.0.1 and update dependencies
The commit updates documentation to explicitly mention REST mode in Docker examples, removes duplicate folder creation logic from individual command files by consolidating it in root initialization, increments the app version, and cleans up unused dependencies while maintaining proper error handling.
commit 9a21f32d73
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sun May 25 10:32:50 2025 +0700
feat: add image sending functionality to WhatsApp MCP server
- Introduced a new tool for sending images to WhatsApp contacts or groups.
- Implemented handler functions to process image sending requests, including parameters for phone number, image URL, caption, and additional options.
- Enhanced the MCP server capabilities with image handling features.
commit 936069e068
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sat May 24 18:47:36 2025 +0700
fix: update Send Poll image URL in README to include versioning for cache busting
commit 409742dfec
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sat May 24 18:45:54 2025 +0700
refactor: reorganize HTTP REST API section in README for clarity
commit df1889ad5b
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sat May 24 18:42:09 2025 +0700
docs: enhance README with additional MCP UI details and formatting improvements
commit 74b97f2dd6
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sat May 24 18:31:44 2025 +0700
feat: update README to clarify download instructions and add command for service
commit c24991ddf0
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sat May 24 18:29:01 2025 +0700
feat: enhance README with MCP server details and configuration
commit 8ef03eb1e4
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sat May 24 18:03:41 2025 +0700
feat: enhance MCP server with new WhatsApp tools
- Added new tools for sending messages, contacts, links, and locations via WhatsApp.
- Updated the project structure documentation to include the new MCP server directory.
- Implemented corresponding handler functions for each new tool to process requests and return results.
commit dad99583e9
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sat May 24 16:01:50 2025 +0700
feat: implement WhatsApp MCP server with SSE support
- Added a new command to start the WhatsApp MCP server using Server-Sent Events (SSE).
- Introduced configuration options for MCP server host and port.
- Implemented message sending functionality through the MCP server.
- Updated application version to v6.0.0.
- Added new dependencies for MCP server functionality in go.mod and go.sum.
commit efcdcec087
Author: Aldino Kemal <aldinokemal2104@gmail.com>
Date: Sat May 24 11:05:58 2025 +0700
feat: restructure folder
* feat: Add group participant request management functionality
- Introduced new endpoints for handling requested participants in groups:
- GET /group/participants/requested to retrieve requested participants.
- POST /group/participants/requested/approve to approve participant requests.
- POST /group/participants/requested/reject to reject participant requests.
- Added corresponding methods in the group service to manage participant requests.
- Implemented validation for new request types to ensure proper data handling.
* feat: Update API version and enhance group participant request management
- Bumped API version from 5.3.0 to 5.4.0.
- Added new endpoints for managing group participant requests:
- GET /group/participant-requests to retrieve pending requests.
- POST /group/participant-requests/approve to approve requests.
- POST /group/participant-requests/reject to reject requests.
- Updated group service methods to handle new request types and responses.
- Enhanced front-end components to support requested member management.
* chore: Update dependency versions in go.mod and go.sum
- Bumped versions for several dependencies:
- github.com/PuerkitoBio/goquery from v1.10.2 to v1.10.3
- github.com/mattn/go-sqlite3 from v1.14.27 to v1.14.28
- go.mau.fi/whatsmeow to a new version
- golang.org/x/image from v0.25.0 to v0.26.0
- golang.org/x/net from v0.38.0 to v0.39.0
- github.com/pelletier/go-toml/v2 from v2.2.3 to v2.2.4
- golang.org/x/crypto from v0.36.0 to v0.37.0
- Added new indirect dependencies for petermattis/goid and updated existing ones.
* refactor: Change receiver type for ChangePushName method in userService
* refactor: Rename group participant request endpoints and streamline request handling
- Updated API endpoints for managing group participant requests:
- Changed GET /group/participants/requested to GET /group/participant-requests
- Changed POST /group/participants/requested/approve to POST /group/participant-requests/approve
- Changed POST /group/participants/requested/reject to POST /group/participant-requests/reject
- Refactored front-end methods to handle the new endpoint structure and consolidate approval/rejection logic.
* feat: Add validation for empty Group ID in participant request listing
- Implemented a check to ensure Group ID is not empty in the ListParticipantRequests method.
- Returns a 400 Bad Request response with an appropriate error message if Group ID is missing.
* feat: Enhance participant request management with error handling
- Updated ManageGroupRequestParticipants method to include error handling for participant requests.
- Added validation for the Action field in participant management requests to ensure it is not empty and is one of the allowed values.
* refactor: Update message handling to use domainMessage consistently
- Removed redundant import of message package.
- Updated ReactMessage method to use domainMessage types for request and response, ensuring consistency across the service.
- Bump versions for several dependencies:
- github.com/mattn/go-sqlite3 from v1.14.24 to v1.14.27
- github.com/spf13/viper from v1.20.0 to v1.20.1
- github.com/valyala/fasthttp from v1.59.0 to v1.60.0
- google.golang.org/protobuf from v1.36.5 to v1.36.6
- go.mau.fi/whatsmeow to a new version
- github.com/fsnotify/fsnotify from v1.8.0 to v1.9.0
- github.com/sagikazarmark/locafero from v0.8.0 to v0.9.0
- golang.org/x/net from v0.37.0 to v0.38.0
- golang.org/x/sys from v0.31.0 to v0.32.0
- golang.org/x/text from v0.23.0 to v0.24.0
- Implement new SendLink Vue.js component for sending links with captions
- Enhance URL metadata extraction with more robust image and title detection
- Add support for resolving relative image URLs
- Improve image download and validation process
- Update services and views to support link sending functionality
- Add detection of image transparency across different image formats
- Implement white background rendering for images with transparency
- Support converting transparent images to JPEG/PNG with white background
- Enhance image metadata extraction with transparency checks
- Add logging for transparency processing and image conversion
- Enhance image dimension detection by decoding actual image data
- Add support for detecting image dimensions from downloaded images
- Implement fallback to Open Graph tags if image decoding fails
- Handle square images by setting width and height to nil
- Improve thumbnail upload process for WhatsApp messages
- Add logging for image dimensions and thumbnail upload status
- Restructure WebSocket code for better readability and maintainability
- Extract connection registration, unregistration, and broadcast logic into separate functions
- Improve error handling and logging for WebSocket operations
- Simplify message broadcasting and connection management
- Add more descriptive logging for WebSocket events
- Refactor `init.go` to break down complex event handler into smaller, focused functions
- Add type definitions and comments to improve code readability
- Extract event handling logic into separate functions for better maintainability
- Improve error handling and logging in database initialization
- Add `FormatJID` utility function to handle JID formatting
- Update README with minor formatting improvements
- Introduce Viper for flexible configuration management
- Add `.env.example` file with comprehensive configuration options
- Implement environment variable and `.env` file loading
- Update root command to support configuration from multiple sources
- Add new configuration option for chat storage toggle
- Bump version to v5.2.0 to reflect significant configuration changes
- Introduce new configuration option `--chat-flush-interval` to control chat storage cleanup
- Implement periodic chat storage flushing with configurable interval (default 7 days)
- Migrate chat storage from text to CSV format for better data management
- Add thread-safe file handling for chat storage operations
- Update root command to support new chat flush interval flag
This PR introduce a new flag --db-uri to define a way to specify where to store the db (either locally using `file:` schema, or via `postgres:` schema)
> the database uri to store the connection data database uri (by default, we'll use sqlite3 under storages/whatsapp.db). database uri --db-uri <string> | example: --db-uri="file:storages/whatsapp.db?_foreign_keys=off or postgres://user:password@localhost:5432/whatsapp"`)
Fixes#163
Refactored WebSocket URL construction into a separate constructWebSocketURL method and updated login/logout API paths to use relative URLs instead of absolute paths.
* fix: update deps & bug fix
fix(go.mod): update module dependencies to latest versions to ensure compatibility and security
fix(whatsapp.go): enhance event message handling by adding quoted message field and streamline message building and media extraction functions
* fix: make webhook call async and add retry mechanism
fix(init.go): wrap forwardToWebhook call in a goroutine to make it async
feat(webhook.go): add timestamp field to the webhook payload
fix(webhook.go): implement retry logic for submitWebhook with exponential backoff
* feat: update version
* feat: add max download size validation for media files
- settings.go: add WhatsappSettingMaxDownloadSize for file size
validation (500MB)
- utils.go: check file size before writing media to disk, returning
an error if it exceeds the max limit
* fix: improve error handling and logging
fix(utils.go): replace panic with logrus error logging and return false
fix(webhook.go): add logrus error logging when media download fails
fix(webhook.go): add logrus info and warning logging for webhook submission attempts
* fix: add omitempty tags to JSON fields to avoid empty values
refactor(webhook.go): restructure createPayload to check and add fields conditionally, improving clarity and preventing unnecessary fields
refactor(webhook.go): handle media extraction only when media is present, improving readability and maintainability
* fix: add nil check for device in whatsapp init
fix(init.go): add check for nil device and log error before panic
Ensure proper error handling when no device is found
* feat: add mark as read
feat(message.go): add MarkAsRead functionality to IMessageService for marking messages as read
feat(go.mod): update dependencies to newer versions for improved functionality and security
feat(rest): add endpoint for MarkAsRead to handle marking messages as read through the API
feat(service): implement MarkAsRead logic in serviceMessage to mark messages as read in WhatsApp
feat(validations): add validation for MarkAsRead request to ensure required fields are present
* chore(settings.go): bump AppVersion to v4.21.0 for new release
feat(message.go): add logging for MarkAsRead function using logrus for better traceability
fix(GroupManageParticipants.js): remove redundant '@' from group_id computation
* feat(newsletter): add newsletter service, endpoints, and UI components
Add Newsletter service to support functionality for unfollowing newsletters
Add Newsletter REST controller and routing
Implement newsletter-related endpoints and methods in the User Service
Create UnfollowRequest for the INewsletterService interface
Add MyListNewsletterResponse to user's data fields
Add newsletter validation
Refactor JS components to support newsletter type and simplify recipient forms by moving logic to FormRecipient component
Refactor window global constants to support newsletters
Modify server to initialize and use the newsletter services
Add UI component for listing newsletters
Refactor existing components to use FormRecipient for recipient data input
* chore: update documentation
feat(openapi.yaml): add newsletter support with new paths and schemas
docs(readme.md): update API endpoints including newsletter and images
fix(openapi.yaml): correct duplicated summary text for user my newsletters
* feat: update package name
* feat: Update src/views/components/NewsletterList.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat: Update src/views/components/NewsletterList.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat: Update src/views/components/NewsletterList.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>