v7.4.0

aldinokemal/go-whatsapp-web-multidevicev7.4.0Aug 3, 2025by aldinokemal

AI Summary

Adds subpath deployment support for reverse proxy configurations and introduces smart group management webhooks for participant events (join, leave, admin changes).

Key Highlights

  • Subpath deployment support (`APP_BASE_PATH`)
  • Group participant webhook events (join, leave, admin changes)
  • Enhanced webhook security (URLs hidden in logs)
  • Better error handling and unlimited throughput for webhooks

New Features

  • Subpath Deployment
  • Group Participant Webhooks
  • Webhook Security Improvements

Full Release Notes

## What's New in v7.4.0

šŸš€ **Revolutionary Deployment Flexibility**
  - **Subpath Deployment Support**: You can now deploy the app on any path, not just the root\!
    - **Works Behind Reverse Proxies**: Perfect for deployments like `https://yoursite.com/whatsapp/`
    - **Easy Configuration**: Just set `APP_BASE_PATH=/your-path` or use `--base-path` flag
    - **Backward Compatible**: Still works perfectly at root path (no changes needed for existing setups)
    - **All Assets Fixed**: CSS, JavaScript, images, and API calls all work correctly with subpaths
    - **WebSocket Support**: Even real-time features work properly with custom paths

šŸŽÆ **Smart Group Management Webhooks**
  - **Group Participant Events**: Get notified when people join, leave, or change roles in groups
    - **Join Events**: Know when new members join or are added to groups
    - **Leave Events**: Track when members leave or are removed from groups
    - **Admin Promotions**: Get alerts when members are promoted to admin
    - **Admin Demotions**: Monitor when admins are demoted to regular members
    - **Rich Event Data**: Includes group ID, event type, affected user IDs, and timestamps

šŸ”’ **Enhanced Security & Reliability**
  - **Better Webhook Security**: Webhook URLs are no longer exposed in logs (prevents credential leaks)
  - **Improved Error Handling**: Webhooks try all configured URLs instead of stopping at first failure
  - **Better HTTP Processing**: Fixed issues with webhook delivery that could cause failures
  - **Unlimited Throughput**: Removed rate limiting for maximum webhook delivery speed
  - **Context Management**: Proper timeout and cancellation handling for all webhook operations

šŸ“¦ **Technical Improvements**
  - **Updated Dependencies**: Latest Go modules for better security and performance
  - **Cleaner Code Architecture**: Better separation of concerns for webhook handling
  - **Enhanced Documentation**: Comprehensive webhook examples and integration guides
  - **Resource Optimization**: More efficient memory and network usage

## šŸŽÆ **What This Means for You**

### For DevOps & System Administrators
- **Flexible Deployments**: Deploy behind any reverse proxy (Traefik, NGINX, Apache) with custom paths
- **Better Monitoring**: Rich webhook events help you track group activities automatically
- **Production Ready**: Enhanced reliability and security for enterprise deployments
- **Easy Migration**: Existing setups work without any changes

### For Developers & Integrators
- **Group Event Automation**: Build bots that respond to group membership changes
- **Reliable Webhooks**: Better delivery guarantees and error handling
- **Rich Event Data**: Detailed information about what happened and when
- **Security Best Practices**: No more sensitive data in logs

### For End Users
- **More Reliable Service**: Better error handling means fewer disruptions
- **Faster Performance**: Optimized webhook processing doesn't slow down message handling
- **Future-Proof**: Your deployment can easily adapt to infrastructure changes

## šŸ› ļø **New Configuration Options**

### Subpath Deployment
```bash
# Environment variable
APP_BASE_PATH=/whatsapp

# Command line flag
./whatsapp rest --base-path="/whatsapp"

# Works with any path
APP_BASE_PATH=/api/messaging/whatsapp
```

### Webhook Events
Your webhook endpoint will now receive group events like this:
```json
{
  "event": "group.participants", 
  "payload": {
    "chat_id": "120363402106XXXXX@g.us",
    "type": "join",
    "jids": ["6289685XXXXXX@s.whatsapp.net"]
  },
  "timestamp": "2025-08-03T10:30:00Z"
}
```

## šŸ“‹ **Migration Guide**

### For Subpath Deployments
If you want to deploy on a custom path:
1. Set `APP_BASE_PATH=/your-custom-path` in your environment
2. Update your reverse proxy config to forward to the new path
3. That's it\! Everything else works automatically

### For Webhook Users  
- Group events are automatically enabled if you have webhooks configured
- No changes needed to existing webhook endpoints
- New events will start arriving immediately after upgrade

## Important Notes

āœ… **Fully Backward Compatible**
- Existing deployments work without any changes
- All current webhook events continue to work
- No breaking changes to API or configuration

šŸ”§ **Production Tested**
- Subpath deployment tested with real reverse proxy setups
- Webhook reliability improvements tested under high load
- Security enhancements verified to prevent credential exposure

## Summary

This release is all about flexibility and reliability. The major highlight is subpath deployment support, which solves a common pain point for teams deploying behind reverse proxies. The group webhook events add powerful new automation capabilities, while security and reliability improvements make the whole system more robust.

Whether you're running a simple setup or a complex enterprise deployment, v7.4.0 adapts to your infrastructure needs while providing more insights into group activities.

**Full Changelog**: https://github.com/aldinokemal/go-whatsapp-web-multidevice/compare/v7.3.1...v7.4.0