- 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
- 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
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
* 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
Add auto reconnect checking in `SetAutoReconnectChecking` function
to ensure continuous connection by reconnecting every 5 minutes when
disconnected.
fix: update dependencies
Update dependencies in go.mod and go.sum for compatibility and
performance improvements:
- github.com/valyala/fasthttp v1.55.0 to v1.56.0
- github.com/klauspost/compress v1.17.9 to v1.17.10
- go.mau.fi/whatsmeow v0.0.0-20240911102933-bb3364aa3986 to
v0.0.0-20240927134544-69ba055bef0f
- go.mau.fi/util v0.7.0 to v0.8.0
* feat: update dependencies and improve mention detection
- upgrade Go version in go.mod to 1.23 and specify toolchain
- update several dependencies to their latest versions
- change mention detection to use regular expressions for better accuracy
- add tests for mention detection to verify correctness
* feat: upgrade version
chore(settings.go): update AppVersion to v4.9.2 for the latest release
chore(go.mod): update dependencies:
- go.mau.fi/whatsmeow to v0.0.0-20240209184912-c3e911dd6cfe
- go.mau.fi/util to v0.3.1-0.20240208085450-32294da153ab
- golang.org/x/crypto to v0.19.0
- golang.org/x/sys to v0.17.0
- github.com/rs/zerolog to v1.32.0
- github.com/godbus/dbus/v5 to v5.0.4
- github.com/rs/xid to v1.5.0
- github.com/pkg/errors to v0.9.1
- github.com/coreos/go-systemd/v22 to v22.5.0
- github.com/rs/zerolog to v1.32.0