v7.8.1
aldinokemal/go-whatsapp-web-multidevicev7.8.1Oct 25, 2025by aldinokemal
AI Summary
Fixes a critical PostgreSQL logout issue where foreign key constraints were violated during re-login. Enhances database cleanup to properly remove device records and related data.
Key Highlights
- Fixed PostgreSQL logout functionality with cascade delete support
- Resolves 'violates foreign key constraint' errors on re-login
- Automatic database type detection (PostgreSQL vs SQLite)
- Enhanced logging for database operations
New Features
- PostgreSQL Logout Fix
- Database Cleanup Improvements
- Nil Safety Checks
Full Release Notes
## What's New in v7.8.1
š **Bug Fixes & Improvements**
- **PostgreSQL Database Cleanup**: Fixed logout functionality for PostgreSQL deployments
- **Cascade Delete Support**: Properly deletes all devices and related records (identity keys, sessions, prekeys) on logout
- **Database Type Detection**: Automatically detects PostgreSQL vs SQLite and applies appropriate cleanup strategy
- **Foreign Key Constraint Resolution**: Resolves "violates foreign key constraint" errors when re-logging in
- **Separate Keys Database Support**: Handles cleanup for both main database and separate keysDB if configured
- **Enhanced Logging**: Improved logging to distinguish between database types and operations
- **Nil Safety**: Added nil check for database reference to prevent potential panics during cleanup
## šÆ **What This Means for You**
### For PostgreSQL Users
- **Fix for Login Issues**: Resolves foreign key constraint violations when attempting to re-login after logout
- **Proper Session Cleanup**: All device records and related data are properly removed during logout
- **No More Stale Records**: Old device and identity key records are completely cleaned up from the database
- **Enhanced Reliability**: More robust logout and login flow with PostgreSQL backends
### For All Users
- **Improved Stability**: Better error handling with nil safety checks
- **Better Diagnostics**: Enhanced logging helps identify database-specific operations
- **Production Ready**: More reliable session management for both SQLite and PostgreSQL deployments
## Important Notes
ā
**Targeted Fix**
- Specifically addresses PostgreSQL users experiencing foreign key constraint errors
- SQLite users unaffected - existing behavior preserved
- No breaking changes to existing APIs or functionality
- Backward compatible with all previous versions
ā
**Database Support**
- **PostgreSQL**: Full cascade delete support for clean logout
- **SQLite**: Existing file-based cleanup approach maintained
- **Flexible Configuration**: Works with separate keysDB configurations
š§ **Recommended Actions**
- If you're using PostgreSQL and experienced login issues after logout, upgrade to v7.8.1
- No configuration changes needed - the fix is automatic
- Test your login/logout flow after upgrading to ensure smooth operation
## Summary
Version 7.8.1 is a targeted maintenance release that fixes a critical issue for PostgreSQL users. The enhanced database cleanup functionality ensures that logout operations properly remove all device records and related data, preventing foreign key constraint violations during subsequent login attempts. This release maintains full backward compatibility while providing more robust session management for both SQLite and PostgreSQL deployments.
## What's Changed
* Fix WhatsApp Web Multidevice GitHub Issue by @aldinokemal in https://github.com/aldinokemal/go-whatsapp-web-multidevice/pull/443
* chore: update dependencies and bump app version to v7.8.1 by @aldinokemal in https://github.com/aldinokemal/go-whatsapp-web-multidevice/commit/7eaf23a
**Full Changelog**: https://github.com/aldinokemal/go-whatsapp-web-multidevice/compare/v7.8.0...v7.8.1